[v26.1.x] rpk: use pagination when listing secrets from cloud - #31436
Merged
r-vasquez merged 1 commit intoAug 5, 2026
Merged
Conversation
`rpk security secrets list` issued a single ListSecrets call and read only that page, so the output was silently capped at the server's default page size of 100. The request never set page_size and never followed next_page_token. Add ListAllSecrets to the dataplane client set, following the existing ListAllShadowLinkTopics pattern, and use it in both callers. The shadow create path had the same defect: it validated secret references against a single page requested with page_size 500, which the server clamps. That made `rpk shadow create` reject a valid config with "unable to find ... secret" whenever a cluster had more cluster-scoped secrets than fit in one page. Tests serve ListSecrets over httptest honoring page_size/page_token, so a client that ignores pagination only sees the first page. They cover the page boundaries (0/42/100/101/250 secrets) and that the filter is forwarded on every page. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit e25d3f0)
vbotbuildovich
requested review from
a team,
kbatuigas and
r-vasquez
as code owners
August 5, 2026 16:04
r-vasquez
approved these changes
Aug 5, 2026
Collaborator
Author
CI test resultstest results on build#88249
|
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.
Backport of PR #31427
Conflict details
secretListItemformatter refactor, which does not exist on v26.1.x; kept the target branch'sout.NewTable/tw.PrintStructFieldsoutput (and itssecretScopesvariable) and applied only the commit's intent — iterating the paginatedsecretsslice returned bycl.ListAllSecretsinstead of the single-pageresponse.Msg.Secrets. Theconnectrpc.com/connectimport removal merged cleanly and the file has no remainingconnect.uses.