Skip to content

fix: paginate ListNotCompletedDeployments in legacy piped - #7147

Open
Goyamjain06 wants to merge 1 commit into
pipe-cd:masterfrom
Goyamjain06:fix/1937-pagination
Open

fix: paginate ListNotCompletedDeployments in legacy piped#7147
Goyamjain06 wants to merge 1 commit into
pipe-cd:masterfrom
Goyamjain06:fix/1937-pagination

Conversation

@Goyamjain06

Copy link
Copy Markdown

What this PR does

Updates the legacy piped deployment store to follow the pagination cursor returned by ListNotCompletedDeployments.

Previously, sync() fetched only the first page and ignored the returned cursor. It now continues fetching until the cursor is empty, ensuring all pending/planned/running deployments are included.

Changes

  • Update pkg/app/piped/apistore/deploymentstore/store.go to paginate ListNotCompletedDeployments using resp.Cursor.
  • Add store_test.go with coverage for:
    • empty responses
    • deployment status classification
    • multi-page pagination
    • 3+ page pagination
    • ROLLING_BACK classification
    • errors during pagination
  • No proto, server, controller, or unrelated changes.

Tests

  • go test ./pkg/app/piped/apistore/deploymentstore/... — pass
  • go vet ./pkg/app/piped/apistore/deploymentstore/... — pass
  • make check — Go build and web build pass. The golangci-lint step is blocked by the pinned lint image using Go 1.25.0 while the repository requires Go 1.26.2.

Fixes #1937

…ent store

Signed-off-by: Goyam Jain <goyam24224@iiitd.ac.in>
@Goyamjain06
Goyamjain06 requested a review from a team as a code owner August 11, 2026 03:04
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi @Goyamjain06, welcome to PipeCD and thanks for opening your first pull request!

We’re really happy to have you here

Before your PR gets merged, please check a few important things below.


Helpful resources


DCO Sign-off

All commits must include a Signed-off-by line to comply with the Developer Certificate of Origin (DCO).

In case you forget to sign-off your commit(s), follow these steps:

For the last commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/master
git push --force-with-lease

Run checks locally

Before pushing updates, please run:

make check

This runs the same checks as CI and helps catch issues early.


💬 Need help?

If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel.
You can get your Slack invite from: https://communityinviter.com/apps/cloud-native/cncf

Thanks for contributing to PipeCD! ❤️

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.

Call ListNotCompletedDeployments using cursor until all required deployments are fetched.

1 participant