ci: release notes batch 10 commits per GraphQL query and retry GitHub 5xx

Merged
LA
23d ago
+15-5

Summary

The 0.65.2 RC publish (run 38501752257) passed the new RC-line guard from #20331, then failed in scripts/ci/nightly_release_notes.py with GitHub metadata request failed. A new RC line summarizes the commits since the two lines split, about 2,000 commits here. I reproduced it locally against the same range: GitHub answered the 25-commit associatedPullRequests GraphQL batch with HTTP 502 (each commit asks for up to 10 PRs with 100 labels and 100 files).

This PR:

  • Batches 10 commits per GraphQL query (COMMIT_BATCH).
  • Retries a GitHub 5xx up to 3 times, with a 2, 4 and 8 s backoff. Other failures still stop at once.

Verification

  • Local run of collect_prs with this script against the real range (published 77eea5f → rc/v0.65.2 d17004f, which goes through the merge-base path): completes with 1,328 PRs in about 19 minutes. The rendered notes still list at most 40 PRs plus an "and N more" link.
  • tests/test_nightly_release_notes.py: passes. The batching test now checks COMMIT_BATCH; 27 commits give 3 queries.

After the merge, I re-run the failed publish job of run 38501752257, so the 0.65.2 RC reaches the feed.

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the release notes script failing on large commit ranges: the 0.65.2 RC publish hit HTTP 502 because GitHub rejected the 25-commit GraphQL batch. The script now batches 10 commits per query and retries GitHub 5xx responses up to 3 times with 2, 4, and 8 s backoff; other failures still fail immediately.

Summary by CodeRabbit

  • Chores
    • Release note generation now retries temporary server errors before reporting a failure, helping it recover from intermittent service issues.
    • Commit information is processed in smaller batches, with the batch size reflected in automated checks.