Skip to content

ci: retry transient API failures when selecting the merge-queue runner - #5043

Merged
zackees merged 2 commits into
masterfrom
infra/select-timeout
Nov 18, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/select-timeout

Conversation

@zackees

@zackees zackees commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Transient GitHub API latency currently sends merge-group heavy jobs to hosted runners while Dell capacity is idle. Use 10-second request timeouts with at most two retries for timeout/connection failures, HTTP 5xx and 429. Short jittered backoff respects Retry-After up to five seconds; other 4xx responses remain single-attempt failures.

All attempts consume the existing ten-request budget. A shared 45-second deadline bounds requests/backoff, and the Linux entry point arms an enclosing wall-clock timer to interrupt blocked DNS/body reads. Deadline expiry always publishes the existing hosted fallback, including when a helper swallows the alarm. The selector job retains its two-minute timeout; no workflow files change.

Refs #5038. Refs #5025.

Validation:

  • RED 27b117c83: uv run --no-project ci/test_select_mq_runner.py RetryDeadlineTest failed (8 tests, 11 failed assertions/subtests). Evidence recorded locally before implementation; RED and GREEN are pushed together for this focused CI fix.
  • GREEN: all 72 selector tests pass without network access or real sleeping, including transient recovery, persistent failure, 5xx/429, other 4xx, per-request retries, shared attempt budget, deadline cutoff and interrupted body-read output.
  • uvx --from ruff==0.14.0 ruff check ci/select_mq_runner.py ci/test_select_mq_runner.py and git diff --check pass.
  • Local review: clean (one reviewer).
  • Full ./lint: passed, lane lint: ok (434.2s) (exit 0; bounded reporter parsed verdict unknown).
  • ./push: passed; final signed and verified head 218863dbd0c367a1d5d56cf5625253a002519d22 carries 19 Ci-Attestation records (complete required client lint/checks/Linux tests). Main Rust suite: 8,924 passed; feature configurations also passed. Optional Swift evidence was not stamped: swift-format is unavailable; no Swift files change.

Rust/C/API/protocol tiers do not apply to this Python CI selector change. No native implementation or coverage-label expansion is needed. Live GitHub latency recovery has not been exercised; deterministic fake-API tests cover selection behavior.

Refs #5038

Ci-Attestation: {"at":1794974805,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":103,"stamp":"d3c8b1c5f6e752df5a412ac7fdb36b22","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974805,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":103,"stamp":"2fe999df7067974cfc507e40fbcd04dd","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974805,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":103,"stamp":"71456bf4ff578de5345577918253f485","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974805,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":103,"stamp":"b1993ac7a66549810751c0cb61ad6941","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"general/all/client-lint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"53b25c361aaa4bd4cdd9e331a9ff49eb","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974805,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":103,"stamp":"2dbeeaff8adcbf123ab6a2d785e9ba59","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"0e6e4c6dd232b61b7cbb70e386234c38","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"096264c58889387206dd690133655c6b","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"9aba2270f35d086490414e90aaa3dda6","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"68c3cd27bf872f545ea9807083f3cddd","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"14115acfd84a505db2d8c1f06050167b","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"14a115a07f635b37c29275cce53f341e","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"b1fa6719d57c71e8457682aff708d27f","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"e652e8fbfea5991da2450c0bcde7bd0b","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"f0300b86c1fe120c502a392d0336d4db","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974700,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"cdbf12bee95d035370e91fe3650d4f18","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"f227f98d95735bca94a8340fe9d3f742","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794974699,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da1665bbcfb182c95bd876c665dba52d671cf00238b24dadaabbcdb863dcadba","lane":"client-lint","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":233,"stamp":"aa520724479e842dc26e281e7667198d","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}
Ci-Attestation: {"at":1794975508,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"c1fe75b9fc34200108022fabe13950a48d2129b5084ab640016ab4a55ce6c681","lane":"client-test-x86_64-unknown-linux-gnu","parents":["27b117c83ba812ae42c89ed14b06f296ca6ee74f"],"secs":702,"stamp":"021598e88cef55a364c64c71c0d397b9","tree":"3589b2878521b03b45c16eb834bb1978af8c1168","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"a85b9a45659adba3dfe1241e28a4b87bec74e28b","coverage":"all-tracked-applicable-files","diff":["ci/select_mq_runner.py","ci/test_select_mq_runner.py","docs/ci-tooling.md"],"head":"3ef6aabf3a94393e9e03fd35cf6602e53f2540d9","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"9d0c276ae298205e89ca1e4d0bd5204b4ca6b6ff430dae0e3f2dd2cb8fd137bb","tree":"3589b2878521b03b45c16eb834bb1978af8c1168"}}
@zackees
zackees enabled auto-merge November 18, 2026 04:19
@zackees
zackees added this pull request to the merge queue Nov 18, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 18, 2026
@zackees
zackees added this pull request to the merge queue Nov 18, 2026
Merged via the queue into master with commit b0222ed Nov 18, 2026
43 checks passed
@zackees
zackees deleted the infra/select-timeout branch November 18, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant