Skip to content

fix(quarantine): Walk paginated /quarantines pages#12

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/remyduthu/remyduthu/mrgfy-7391-walk-paginated-quarantines/walk-paginated-quarantines-pages--20253459
May 27, 2026
Merged

fix(quarantine): Walk paginated /quarantines pages#12
mergify[bot] merged 1 commit into
mainfrom
devs/remyduthu/remyduthu/mrgfy-7391-walk-paginated-quarantines/walk-paginated-quarantines-pages--20253459

Conversation

@remyduthu
Copy link
Copy Markdown
Contributor

The Mergify API kept the unpaginated GET /v1/ci/{owner}/repositories/{repo}/quarantines shortcut for backward compatibility but its OpenAPI now states the shortcut "is expected to go away once all callers paginate." Repositories with large quarantine sets (e.g. PSPDFKit at 2,463 entries) trigger statement timeouts on the unpaginated path. Walking RFC 5988 next links bounds each request and lets the server drop the shortcut.

References: MRGFY-7391

Copilot AI review requested due to automatic review settings May 27, 2026 09:25
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 27, 2026 09:25 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 27, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Approval

Wonderful, this rule succeeded.
  • #approved-reviews-by >= 2

🟢 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = test (3.1)
    • check-success = test (3.2)
    • check-success = test (3.3)
    • check-success = test (3.4)

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team May 27, 2026 09:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the quarantine client to use the Mergify API’s paginated /quarantines endpoint by following RFC 5988 Link: ... rel="next" headers, avoiding statement timeouts triggered by large, unpaginated quarantine sets.

Changes:

  • Add pagination support in Mergify::RSpec::Quarantine by iterating over next links and concatenating results.
  • Ensure per_page=100 is requested to bound response size per call.
  • Update specs to reflect the new query params and to cover multi-page and mid-pagination error behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lib/mergify/rspec/quarantine.rb Implements pagination by walking RFC 5988 next links and aggregating quarantined test names across pages.
spec/mergify/rspec/quarantine_spec.rb Updates stubbing to include per_page and adds coverage for pagination success and failure cases.
spec/mergify/rspec/ci_insights_spec.rb Updates quarantine endpoint stubs to include per_page in the expected query.
spec/integration/quarantine_spec.rb Updates integration stub expectations to include per_page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The Mergify API kept the unpaginated `GET /v1/ci/{owner}/repositories/{repo}/quarantines` shortcut for backward compatibility but its OpenAPI now states the shortcut "is expected to go away once all callers paginate." Repositories with large quarantine sets (e.g. PSPDFKit at 2,463 entries) trigger statement timeouts on the unpaginated path. Walking RFC 5988 `next` links bounds each request and lets the server drop the shortcut.

References: MRGFY-7391
Change-Id: I20253459ac4b306f562b78090b20d5412cba5e0a
@remyduthu remyduthu force-pushed the devs/remyduthu/remyduthu/mrgfy-7391-walk-paginated-quarantines/walk-paginated-quarantines-pages--20253459 branch from 50b909d to 1033cfa Compare May 27, 2026 09:45
@remyduthu
Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 50b909d 2026-05-27 09:45 UTC
2 content 50b909d → 1033cfa (raw) 2026-05-27 09:45 UTC

@mergify mergify Bot deployed to Mergify Merge Protections May 27, 2026 09:46 Active
@remyduthu remyduthu self-assigned this May 27, 2026
@remyduthu remyduthu marked this pull request as ready for review May 27, 2026 10:12
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 27, 2026

Merge Queue Status

  • Entered queue2026-05-27 11:20 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-27 11:20 UTC · at 1033cfabd35fdf1b34290e40ad80d86bc8f940f6 · squash

This pull request spent 22 seconds in the queue, including 4 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label May 27, 2026
@mergify mergify Bot merged commit 1798379 into main May 27, 2026
10 checks passed
@mergify mergify Bot deleted the devs/remyduthu/remyduthu/mrgfy-7391-walk-paginated-quarantines/walk-paginated-quarantines-pages--20253459 branch May 27, 2026 11:20
@mergify mergify Bot removed the queued label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants