Skip to content

Commit 53286d4

Browse files
Retry setup-ruby once so release 504s can't fail Ruby legs (#2041)
* Retry setup-ruby once after a release 504 ruby/setup-ruby fetches the prebuilt Ruby from a github.com release and gives up after about a minute of its own retries. On 2026-11-09 a ~4 minute release-CDN 504 outage failed the nightly CI run on main (run 42568829044) in hosted-e2e and two gem e2e legs at that step. Mirror the existing setup-python pattern: cap attempt 1 at 4 minutes with continue-on-error, pause 60 s, then run attempt 2, which fails the job if the download is still broken. Applied to the shared e2e-steps anchor (e2e, e2e-extended, e2e-windows, e2e-macos, e2e-full) and hosted-e2e. Job names and the ci-ok gate are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeRYC9ragXuhk4udbwz * Drop the pause between setup-ruby attempts test_merge_queue_fail_fast.py requires a continue-on-error attempt 1 to be retried by the very next step, so the sleep step in between failed lint-ecosystems. Attempt 2 now follows attempt 1 directly and gets setup-ruby's own ~1 min of backoff retries again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeRYC9ragXuhk4udbwz --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4470a4d commit 53286d4

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,9 +1609,18 @@ jobs:
16091609
if: matrix.pipenv != '' || matrix.pip != ''
16101610
run: uv python install 3.8 3.11 3.12
16111611

1612-
- name: Setup Ruby
1612+
- name: Setup Ruby (attempt 1)
1613+
# setup-ruby downloads the prebuilt Ruby from a github.com release
1614+
# and gives up after ~1 min of retries. On 2026-11-09 (nightly run
1615+
# 42568829044) a ~4 min release-CDN 504 outage failed two gem legs
1616+
# and hosted-e2e here. Try once more, with setup-ruby's own ~1 min
1617+
# of retries again; a second failure is not a blip. (Attempt 2
1618+
# must be the very next step: test_merge_queue_fail_fast.py.)
1619+
id: setup-ruby
16131620
if: matrix.suite == 'e2e_gem' || matrix.bundler != ''
16141621
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
1622+
timeout-minutes: 4
1623+
continue-on-error: true
16151624
with:
16161625
# setup-ruby does NOT support `3.2.x` wildcard pinning the
16171626
# way setup-python does — it errors with "Unknown version
@@ -1628,6 +1637,15 @@ jobs:
16281637
bundler: 'none'
16291638
bundler-cache: false
16301639

1640+
- name: Setup Ruby (attempt 2)
1641+
if: (matrix.suite == 'e2e_gem' || matrix.bundler != '') && steps.setup-ruby.outcome != 'success'
1642+
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
1643+
timeout-minutes: 4
1644+
with:
1645+
ruby-version: ${{ matrix.ruby || '3.2.10' }}
1646+
bundler: 'none'
1647+
bundler-cache: false
1648+
16311649
# The legs pin their bundler (`bundler:`) so a capstone never rides
16321650
# whatever bundler the runner's Ruby ships; e2e_gem keeps the 2.5
16331651
# floor. A two-part version gets the `~> X.Y.0` requirement setup-ruby's
@@ -2889,16 +2907,29 @@ jobs:
28892907
if: steps.gate.outputs.run == 'true'
28902908
run: scripts/pip-install-retry.sh uv && uv --version
28912909

2892-
- name: Setup Ruby
2910+
- name: Setup Ruby (attempt 1)
2911+
# Capped and retried once, as in the e2e job.
2912+
id: setup-ruby
28932913
if: steps.gate.outputs.run == 'true'
28942914
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
2915+
timeout-minutes: 4
2916+
continue-on-error: true
28952917
with:
28962918
ruby-version: '3.2.10'
28972919
# Bundler comes from the next step, which retries rubygems.org
28982920
# blips; setup-ruby's own install is a single bare `gem install`.
28992921
bundler: 'none'
29002922
bundler-cache: false
29012923

2924+
- name: Setup Ruby (attempt 2)
2925+
if: (steps.gate.outputs.run == 'true') && steps.setup-ruby.outcome != 'success'
2926+
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
2927+
timeout-minutes: 4
2928+
with:
2929+
ruby-version: '3.2.10'
2930+
bundler: 'none'
2931+
bundler-cache: false
2932+
29022933
- name: Install Bundler
29032934
if: steps.gate.outputs.run == 'true'
29042935
# The gem hosted rewrite pins into the Gemfile.lock CHECKSUMS

0 commit comments

Comments
 (0)