Skip to content

Sort on-call pages by recent first by default - #710

Merged
platinummonkey merged 1 commit into
mainfrom
dd/fix/on-call-pages-newest-first-202608071555
Aug 7, 2026
Merged

Sort on-call pages by recent first by default#710
platinummonkey merged 1 commit into
mainfrom
dd/fix/on-call-pages-newest-first-202608071555

Conversation

@platinummonkey

@platinummonkey platinummonkey commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Makes pup on-call pages list request newest on-call pages first by default by sending sort=-created_at to the unstable pages endpoint, and exposes --sort for created_at and -created_at.

Motivation

Teams with more than 1000 historical pages could not reach current pages because the command requested only oldest-first results from a capped endpoint. Defaulting to newest-first keeps current pages reachable while the stable paginated and time-filtered backend endpoint is unavailable.

Additional Notes

This keeps the existing unstable endpoint and does not add --from or --to; pagination remains limited by the backend.

Changes

  • Added --sort to on-call pages list with default -created_at.
  • Passed the sort query parameter to /api/unstable/on-call/pages.
  • Added validation and tests for accepted and rejected sort values.
  • Updated README.md and docs/COMMANDS.md summaries.

Testing

  • cargo +stable fmt --check
  • git diff --check
  • Attempted cargo +stable test on_call_pages -- --test-threads=1, but cargo could not fetch the pinned datadog-api-client-rust git dependency because the sandbox allowlist returned HTTP 403.
  • Attempted CARGO_NET_GIT_FETCH_WITH_CLI=true cargo +stable test on_call_pages -- --test-threads=1; it hit the same allowlist HTTP 403.

Checklist

  • The code change follows the project conventions (see CONTRIBUTING.md)
  • Tests have been added/updated (if applicable)
  • Documentation has been updated (if applicable)
  • All CI checks pass
  • Code coverage is maintained or improved

Related Issues

Closes #709


PR by Bits - View session in Datadog

Comment @DataDog to request changes

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 7, 2026

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@platinummonkey
platinummonkey requested a review from a team as a code owner August 7, 2026 16:13
@datadog-official

Copy link
Copy Markdown

I can only run on private repositories.

@platinummonkey
platinummonkey merged commit bf0ea86 into main Aug 7, 2026
6 checks passed
@platinummonkey
platinummonkey deleted the dd/fix/on-call-pages-newest-first-202608071555 branch August 7, 2026 17:17
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.

[FEATURE] on-call pages list still can't reach current pages once a team's history exceeds 1000 (follow-up to #642 / #670)

3 participants