Skip to content

Fetch all pages in piped ListApplications - #7052

Open
rootp1 wants to merge 1 commit into
pipe-cd:masterfrom
rootp1:fix/piped-listapplications-pagination
Open

Fetch all pages in piped ListApplications#7052
rootp1 wants to merge 1 commit into
pipe-cd:masterfrom
rootp1:fix/piped-listapplications-pagination

Conversation

@rootp1

@rootp1 rootp1 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

Summary

  • paginate PipedAPI.ListApplications internally until the datastore cursor is exhausted
  • add a regression test that verifies multi-page application results are fully returned to piped clients

Why we need it:

PipedAPI.ListApplications currently returns only the first datastore page and silently drops additional applications when a piped manages more than one page of apps.

Which issue(s) this PR fixes:

Fixes #7051

What Changed

  • replaced the single applicationStore.List call in pkg/app/server/grpcapi/piped_api.go with an internal loop over datastore cursors
  • added TestPipedAPIListApplicationsFetchesAllPages in pkg/app/server/grpcapi/piped_api_test.go

Verification

  • go test ./pkg/app/server/grpcapi -run TestPipedAPIListApplicationsFetchesAllPages — passed
  • go test ./pkg/app/server/grpcapi — passed
  • $(go env GOPATH)/bin/golangci-lint run --config .golangci.yml ./pkg/app/server/grpcapi/... — passed
  • make check/gen/code — passed
  • make check — failed: repository lint step uses golangci-lint v2.4.0 built with Go 1.25, but this repository targets Go 1.26.2, so lint aborts before the test phase
  • ./hack/ensure-dco.sh — failed: reports pre-existing commit 25ae69937e55e8330bff96c34346718f3e5e7148 missing Signed-off-by; new commit 5430db3949cb1ef3a5bdb90608629f90e44e24eb is signed off

Scope

  • unrelated files were not changed; only the piped ListApplications handler and its focused test were updated

Does this PR introduce a user-facing change?:

  • How are users affected by this change: piped clients now receive all registered applications even when the datastore returns multiple pages
  • Is this breaking change: no
  • How to migrate (if breaking change): not applicable

Signed-off-by: rootp1 <arnav.iitr@gmail.com>
@rootp1
rootp1 requested a review from a team as a code owner July 21, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: piped ListApplications silently truncates paginated results

1 participant