pballester opened a new pull request, #9164: URL: https://github.com/apache/devlake/pull/9164
### Summary Fixes the Tempo worklog collection and conversion described in #9163 — full diagnosis and evidence there. Two commits, kept separate for review: **1. `fix(tempo): paginate worklogs and honour the sync time range`** - Drop `GetTotalPages`: Tempo v4 `PageableMetadata` has no `total`, so the page count was always 0 and only the first 1000 worklogs were collected. The collector now uses the helper's undetermined mode and fetches pages until one comes back short. - Time bounds via a small pure `buildWorklogQuery`: full sync → `from=timeAfter`; incremental → `updatedFrom=<last successful collection>`; explicit `fromDate`/`toDate` options still win. Same bounds for the team and global endpoints (previously the team endpoint always used a rolling `now − 90d` window). - Scope raw data and collector state per team (`TeamId` in the params, matching `TempoTeam.GetParams()`), so team scopes of one connection no longer share one incremental state. The extractor tags worklogs with their `team_id`; the convertor converts one team at a time. **2. `fix(tempo): emit worklog issue and author ids that join the jira domain`** - `issue_id`: `jira:JiraIssue:<conn>:<id>` (was `JiraIssues`, which matches nothing the jira plugin generates). - `author_id`: `jira:JiraAccount:<conn>:<id>` (was the bare Atlassian id). - `buildIssueIdMapping` removed: both branches produced the identical string, so the `_tool_jira_issues` scan had no effect. As before, the convertor assumes the Tempo connection id equals the Jira connection id; not changed here to keep the scope tight — happy to follow up (e.g. a scope-config field for the Jira connection) if maintainers want it. **Upgrade note:** existing raw rows were stored with `TeamId: 0` params, so after this change each team starts with a fresh collector state and does one full sync from `timeAfter`. Domain rows keep the same ids (`tempo:TempoWorklog:<id>`) and are overwritten in place. **Tests** - New unit test `TestBuildWorklogQuery` (pagination, full vs incremental bounds, explicit options, global endpoint). - New e2e `TestWorklogExtraction` (team-scoped raw params → `team_id` populated); verified it fails without the fix. - `TestWorklogDataFlow` snapshot updated to the corrected ids. - `go vet` / `gofmt` clean; `golangci-lint` reports no new findings in the plugin; e2e run against MySQL 8.0. ### Does this close any open issues? Closes #9163 ### Screenshots N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
