Repository navigation
Retry setup-python on a transient download failure - #1803
Conversation
On 2026-10-28 an e2e leg (run 40771482790, job 123111232415) failed in Setup Python: the 3.12.10 download died on `getaddrinfo EAI_AGAIN raw.githubusercontent.com` and the step held the runner for 19 min before going red. A healthy setup takes ~6 s. In the merge queue the same blip evicts the entry and costs a full rebuild. Cap each setup-python call in ci.yml (e2e and hosted-e2e) at 4 min and retry it once when the first attempt fails or times out. The second attempt does not tolerate failure, so a real outage still fails the leg. The ci.yml contract test only let capped cache restores carry continue-on-error. Also allow a capped "(attempt 1)" step whose very next step is an "(attempt 2)" of the same action, gated on the first attempt's outcome and without continue-on-error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 54ee197. Configure here.
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Final review briefWhat it does: The two Risk: low. This is CI-only. A real failure still fails the leg at attempt 2, so Look here:
Verified: I read the full diff. The step ids don't collide within either job, and the old step name "Setup Python + uv" has no other references. CHANGELOG.md is untouched. CI: Changes I made: none. Open questions: none. I'm arming auto-merge, so approving sends it straight to the merge queue. Generated by Claude Code |
Problem
On 2026-10-28 the e2e leg
e2e (ubuntu-latest, e2e_vendor_composer_build e2e_redirect_composer_build e2e_redirect_uv_build …)of run 40771482790 (attempt 1, job 123111232415, Depot runner) failed in Setup Python:The step didn't finish until 21:45:25, so it held the leg for 19 min before going red. Re-running the job passed, so this was a DNS blip, not a real failure. A healthy Setup Python takes 0–6 s (merge_group run 40782886803). On a PR this costs a re-run. In the merge queue the same blip evicts the entry and every entry behind it rebuilds.
Frequency is low: this is the only setup-* step failure among failed CI jobs since 2026-10-22. It is still the only infra flake in the last ~10 h of CI that can be fixed in the repo (the other one was a Depot runner loss, which the merge-queue fail-fast job already recognises). Python-using e2e legs run on every PR and in every merge_group run, and #1740 (yarn EAI_AGAIN) fixed the same class of failure.
Root cause
actions/setup-pythondownloads 3.12.10 on runners that don't cache it. It fetches the versions manifest from raw.githubusercontent.com, which has no retry for a DNS failure, and the step has no time limit.Fix
ci.yml, both setup-python calls (e2eandhosted-e2e) now run as(attempt 1)withtimeout-minutes: 4andcontinue-on-error: true, then(attempt 2)with the same pin and inputs, which runs only when attempt 1's outcome isn'tsuccess. Attempt 2 doesn't tolerate failure, so a real outage still fails the leg. This is the same pattern as.github/actions/download-artifact.scripts/tests/test_merge_queue_fail_fast.py::test_no_job_tolerates_failure) used to let only capped cache restores carrycontinue-on-error. It now also accepts a capped(attempt 1)step, but only when the very next step is an(attempt 2)of the sameuses:, gated onsteps.<id>.outcome != 'success'and withoutcontinue-on-error. A tolerated step can no longer hide a failure fromci-okor the fail-fast cancel.hosted-e2e's step was named "Setup Python + uv", but uv is installed by the next step, so it is now "Setup Python (attempt 1/2)". Nothing references the old name.No tests were removed or moved, and required-check names and
ci-okare unchanged.Proof
python3 -B -m unittest discover -s scripts/testspasses: 376 tests, 6 skipped. Before the test change, the contract test failed on the new attempt-1 step, so it does check this.if,timeout-minutesandcontinue-on-errorvalues.https://claude.ai/code/session_011f9aeRTxATcS2gdrSf6uDJ
Generated by Claude Code