bug: piped ListApplications silently truncates paginated results
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
name: Bug Report
about: Report a bug encountered
labels: kind/bug
What happened:
PipedAPI.ListApplications only returns the first datastore page for a piped's applications. When applicationStore.List returns a non-empty cursor, the RPC ignores it and returns immediately, so applications beyond the first page are silently dropped.
Summary
pkg/app/server/grpcapi/piped_api.go fetches a single page from applicationStore.List and discards the returned cursor. A piped that manages more applications than fit in one datastore page receives an incomplete application list.
Affected Area
pkg/app/server/grpcapi/piped_api.go- callers of
pipedservice.PipedService/ListApplications
What you expected to happen:
ListApplications should return a complete application set for the piped. With the current RPC contract, that means iterating datastore pages internally until the cursor is exhausted before returning the response.
Expected Behaviour
ListApplications collects all pages from applicationStore.List and returns the full application list without requiring client-side pagination support.
How to reproduce it:
- Mock
applicationStore.ListforPipedAPI.ListApplicationsso the first call returns one application plus a non-empty cursor. - Make the second call return another application and an empty cursor.
- Invoke
PipedAPI.ListApplications. - Observe on current
masterthat only the first application is returned because the second page is never fetched.
Steps to Reproduce
- Seed or mock a project/piped with more applications than the datastore returns in one page.
- Call
PipedAPI.ListApplications. - Observe that only the first page is returned and no continuation cursor is exposed to the piped client.
Environment:
pipedversion: currentmasteras of July 21, 2026control-planeversion: currentmasteras of July 21, 2026- Others: Not applicable
Actual Behaviour
Only the first datastore page is returned, and remaining applications are silently omitted.
Technical Evidence
pkg/app/server/grpcapi/piped_api.gocontainsTODO: Support pagination in ListApplicationsimmediately beforeapps, _, err := a.applicationStore.List(ctx, opts).- The method ignores the returned cursor and responds with that single page.
- The public API path already supports pagination separately, so this bug is isolated to the piped gRPC path rather than the general application listing API.
Suspected Root Cause
PipedAPI.ListApplications does not loop on datastore.ListOptions.Cursor and has no way to return a continuation cursor in the existing response type.
Proposed Direction
Keep the current RPC contract and paginate internally in PipedAPI.ListApplications until the datastore cursor is empty, with a focused unit test that proves multi-page results are fully aggregated.
Acceptance Criteria
- A mocked multi-page
applicationStore.Listtest forPipedAPI.ListApplicationsreturns all applications across pages. - A piped with more than one datastore page of applications receives a complete list.
- Existing single-page callers continue to behave the same.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg/app/server/grpcapi/piped_api.go at the TODO before applicationStore.List. Trace the existing ListApplications flow and its datastore cursor handling, then add a focused unit test using the two mocked pages described in the issue. Done means the RPC returns applications from every page, while single-page callers retain their current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100