Repository navigation
fix(taiga): page through epics, issues, tasks and user stories - #9341
Open
ShivamSharma43 wants to merge 1 commit into
Open
ShivamSharma43 wants to merge 1 commit into
ShivamSharma43 wants to merge 1 commit into
Conversation
The four collectors sent only the project filter. Taiga list endpoints are paginated (30 items per page by default) and return page 1 when no page is given, so only the first 30 items of a project were collected, and the parallel page fetches stored the same page ten times. Send page and page_size, and stop when Taiga reports no next page, since a page past the last one returns 404. Closes apache#9340 Generated-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Taiga
collectEpics,collectIssues,collectTasksandcollectUserStoriessubtasks only collected the first 30 items of a project.Their
Querysent onlyproject. Taiga list endpoints are paginated (PAGINATE_BY: 30in taiga-back) unlessx-disable-paginationis sent, and return page 1 when nopageis given. Each response had 30 items, which is less thanPageSize: 1000, so theApiCollectorstopped after one page. The collector fetched pages 1..10 in parallel and all ten requests were identical, so the raw tables also held the same 30 rows ten times.Changes:
tasks/shared.go(new):taigaProjectListQuerysendsproject,pageandpage_size. The page size is 1000, Taiga'sMAX_PAGINATE_BY.getNextTaigaPageends the collection when the response has noX-Pagination-Nextheader. Taiga answers a page past the last one with 404, so a full last page must not lead to another request. SettingGetNextPageCustomDataalso makes the collector fetch pages one at a time instead of guessing 10 pages in parallel.tasks/shared_test.go(new): checks the query params, and checks that the next-page function stops with and without the header.Does this close any open issues?
Closes #9340
Screenshots
N/A
Other Information
go test ./plugins/taiga/tasks/...: pass. The query test fails on the old query (pageandpage_sizeare empty).go vet ./plugins/taiga/...andgofmt: clean. The e2e tests needE2E_DB_URLand don't cover the collectors.pr-type/bug-fix.taiga/base/api/pagination.py). The commit carries aGenerated-by:trailer per the ASF generative tooling guidance.🤖 Generated with Claude Code