Skip to content

[v26.1.x] rpk: use pagination when listing secrets from cloud - #31436

Merged
r-vasquez merged 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:ai-backport-pr-31427-v26.1.x-1785945739
Aug 5, 2026
Merged

[v26.1.x] rpk: use pagination when listing secrets from cloud#31436
r-vasquez merged 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:ai-backport-pr-31427-v26.1.x-1785945739

Conversation

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Backport of PR #31427

  • Command: git cherry-pick -x e25d3f0
  • Commits backported: 1
  • Conflicts resolved: 1
  • Commits skipped (already on target): 0
  • Backport branch: ai-backport-pr-31427-v26.1.x-1785945739

Conflict details

  • e25d3f0 (src/go/rpk/pkg/cli/security/secret/list.go): the incoming commit rewrote the result loop on top of dev's secretListItem formatter refactor, which does not exist on v26.1.x; kept the target branch's out.NewTable/tw.PrintStructFields output (and its secretScopes variable) and applied only the commit's intent — iterating the paginated secrets slice returned by cl.ListAllSecrets instead of the single-page response.Msg.Secrets. The connectrpc.com/connect import removal merged cleanly and the file has no remaining connect. uses.

`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 vbotbuildovich added this to the v26.1.x-next milestone Aug 5, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 5, 2026
@vbotbuildovich
vbotbuildovich requested review from a team, kbatuigas and r-vasquez as code owners August 5, 2026 16:04
@vbotbuildovich

Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#88249
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(PASS) AlterConfigMixedNodeTest test_alter_config_shadow_indexing_mixed_node {"incremental_update": false} integration https://buildkite.com/redpanda/redpanda/builds/88249#019fd2b7-c2bf-4c5d-b54f-509c4d7f57cc 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0000, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=AlterConfigMixedNodeTest&test_method=test_alter_config_shadow_indexing_mixed_node

@r-vasquez
r-vasquez merged commit cfbded9 into redpanda-data:v26.1.x Aug 5, 2026
25 checks passed
@tyson-redpanda tyson-redpanda modified the milestones: v26.1.x-next, v26.1.15 Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build area/rpk kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants