ShivamSharma43 opened a new pull request, #9307:
URL: https://github.com/apache/devlake/pull/9307

   ### Summary
   
   Tempo team pagination read `metadata.total`, but `GET /4/teams` doesn't 
return a total (its `metadata` is `PageableMetadata` = `count`, `limit`, 
`next`, `offset`, `previous` per the Tempo OpenAPI spec). `total` unmarshalled 
as 0, so only the first 50 teams were ever reached. This is the same root cause 
as #9163, which #9164 fixed for worklogs only.
   
   Changes:
   
   - `api/remote.go` `listTempoRemoteTeams`: return a next page when 
`metadata.next` is set, instead of `offset + limit < total` (always false). The 
data scope picker now lists teams beyond the first 50.
   - `tasks/team_collector.go`: drop `GetTotalPages` (it returned 0, so the 
collector stopped after page 1). The collector now uses the helper's 
undetermined mode and fetches pages until one comes back short, like the 
worklog collector after #9164.
   - `api/remote_test.go`: new unit test for the remote listing: follows `next` 
with the right offset, stops on the last page (no `next`).
   
   No model, migration or API-surface changes (so no swagger regeneration).
   
   ### Does this close any open issues?
   
   Closes #9306
   
   ### Screenshots
   
   N/A
   
   ### Other Information
   
   - `go build` / `go vet` / `gofmt` clean for `./plugins/tempo/...`.
   - `go test ./plugins/tempo/api/ ./plugins/tempo/tasks/`: pass. The new test 
fails on `main` (`nextPage` is nil on the first page).
   - `plugins/tempo/e2e` needs a live `E2E_DB_URL` database, which I didn't run 
locally; the team extractor e2e is unaffected by this change (it only reads raw 
rows).
   - Suggested label: `pr-type/bug-fix`.
   - AI assistance disclosure: this change was prepared with the help of Claude 
Code (Claude Opus 5.5); I reviewed the diff and the Tempo API spec it relies 
on. The commit carries a `Generated-by:` trailer per the ASF generative tooling 
guidance.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to