feat(service-catalog): add --page-size and --page-number to list - #773
Open
eliebleton-manomano wants to merge 1 commit into
Open
feat(service-catalog): add --page-size and --page-number to list#773eliebleton-manomano wants to merge 1 commit into
eliebleton-manomano wants to merge 1 commit into
Conversation
Wires the existing page_size/page_number optional params on ListServiceDefinitionsOptionalParams through to the CLI, matching the pattern used for users list (DataDog#449) and security rules list (DataDog#663). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
service-catalog listwas the one list command with no pagination controls — the underlyingListServiceDefinitionsOptionalParams(datadog-api-client-rust) already supportspage_size/page_number, they just weren't wired up. This adds them, following the same per-command pattern used in #449 (users list) and #663 (security rules list).Changes
src/main.rs—ServiceCatalogActions::Listgains--page-size(default 10) and--page-number(default 0)src/commands/service_catalog.rs—list()now takespage_size/page_numberand passes them toListServiceDefinitionsOptionalParamsTesting
cargo test service_catalog— 3/3 pass (existing test updated with default args, new test covers non-default page size/number)cargo clippy -- -D warnings— cleancargo fmt --check— cleanA note on pagination architecture, for what it's worth
While digging into this we found
origin/janis.kirsteins/pagination, an unmerged branch (4607e03+2561c7b, 2026-03-31) implementing pagination as a unified mechanism — a sharedPaginationInfo/extract_pagination()informatter.rsnormalizing cursor/offset/page-number styles across ~22 commands in one pass, withdocs/PAGINATION.mddocumenting the result. It has no PR history (never opened, best we can tell), and is now 1000+ commits stale.In the roughly five months since, pagination has instead landed via five separate PRs (#449, #458, #663, #732, #761), each adding flags to one command at a time — this PR continues that pattern rather than reviving the unified branch, since that seemed like the pragmatic call at this point.
Just flagging it in case it's useful signal: the unified approach looks like the right shape for this problem in general (one envelope format instead of five-plus bespoke wire-ups, agent-mode pagination metadata for free), and if there's appetite to revisit it, doing so sooner rather than after more piecemeal PRs land would mean less to reconcile. No opinion asserted on priority — just surfacing what we found.
🤖 Generated with Claude Code