Skip to content

Commit 40c541f

Browse files
committed
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
1 parent 568e376 commit 40c541f

1 file changed

Lines changed: 41 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,9 +1609,17 @@ 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. Pause and try once more; a second failure
1617+
# is not a blip.
1618+
id: setup-ruby
16131619
if: matrix.suite == 'e2e_gem' || matrix.bundler != ''
16141620
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
1621+
timeout-minutes: 4
1622+
continue-on-error: true
16151623
with:
16161624
# setup-ruby does NOT support `3.2.x` wildcard pinning the
16171625
# way setup-python does — it errors with "Unknown version
@@ -1628,6 +1636,20 @@ jobs:
16281636
bundler: 'none'
16291637
bundler-cache: false
16301638

1639+
- name: Setup Ruby (pause before attempt 2)
1640+
if: (matrix.suite == 'e2e_gem' || matrix.bundler != '') && steps.setup-ruby.outcome != 'success'
1641+
shell: bash
1642+
run: sleep 60
1643+
1644+
- name: Setup Ruby (attempt 2)
1645+
if: (matrix.suite == 'e2e_gem' || matrix.bundler != '') && steps.setup-ruby.outcome != 'success'
1646+
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
1647+
timeout-minutes: 4
1648+
with:
1649+
ruby-version: ${{ matrix.ruby || '3.2.10' }}
1650+
bundler: 'none'
1651+
bundler-cache: false
1652+
16311653
# The legs pin their bundler (`bundler:`) so a capstone never rides
16321654
# whatever bundler the runner's Ruby ships; e2e_gem keeps the 2.5
16331655
# floor. A two-part version gets the `~> X.Y.0` requirement setup-ruby's
@@ -2874,16 +2896,33 @@ jobs:
28742896
if: steps.gate.outputs.run == 'true'
28752897
run: scripts/pip-install-retry.sh uv && uv --version
28762898

2877-
- name: Setup Ruby
2899+
- name: Setup Ruby (attempt 1)
2900+
# Capped, paused and retried once, as in the e2e job.
2901+
id: setup-ruby
28782902
if: steps.gate.outputs.run == 'true'
28792903
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
2904+
timeout-minutes: 4
2905+
continue-on-error: true
28802906
with:
28812907
ruby-version: '3.2.10'
28822908
# Bundler comes from the next step, which retries rubygems.org
28832909
# blips; setup-ruby's own install is a single bare `gem install`.
28842910
bundler: 'none'
28852911
bundler-cache: false
28862912

2913+
- name: Setup Ruby (pause before attempt 2)
2914+
if: (steps.gate.outputs.run == 'true') && steps.setup-ruby.outcome != 'success'
2915+
run: sleep 60
2916+
2917+
- name: Setup Ruby (attempt 2)
2918+
if: (steps.gate.outputs.run == 'true') && steps.setup-ruby.outcome != 'success'
2919+
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
2920+
timeout-minutes: 4
2921+
with:
2922+
ruby-version: '3.2.10'
2923+
bundler: 'none'
2924+
bundler-cache: false
2925+
28872926
- name: Install Bundler
28882927
if: steps.gate.outputs.run == 'true'
28892928
# The gem hosted rewrite pins into the Gemfile.lock CHECKSUMS

0 commit comments

Comments
 (0)