Repository navigation
Retry release 504s in lint-ecosystems installer steps - #2040
Conversation
The three installer steps in lint-ecosystems run scripts/install.sh against real GitHub release assets, and its single-attempt `curl -fsSL` turned every release-CDN 504 into a red lint-ecosystems and so a red ci-ok: twice on 2026-11-09 (a PR run and the nightly). Write a .curlrc with `retry = 7` under RUNNER_TEMP and point CURL_HOME at it only for the install.sh invocations. Transient errors (timeouts, 408/429/5xx) retry with exponential backoff, ~2 min in all; a 404 or checksum mismatch still fails at once. install.sh is left untouched because install.socket.dev must serve a byte-for-byte copy of it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeSwgKAzXeLTNSLn5pg
|
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 e6775d9. Configure here.
|
The retry turns short 504 bursts into a pass. It can't outlast a release-download outage that lasts several minutes, and a longer window would run into the job's 10-minute timeout across three installer steps. If this degradation keeps up, the more durable follow-up is to have only the first installer step download the release and point the alternate-origin step at a local mirror. That changes what the step tests, so it needs an owner's call and isn't part of this PR. Generated by Claude Code |
|
Ready for review at
Generated by Claude Code |
Final review briefWhat it does. The three Risk: low. This is a CI-only change in one job. curl's Look here
Verified
Changes I made. None. Auto-merge is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
Problem
lint-ecosystemsruns on every PR, in the merge queue and nightly, and is part ofci-ok. Three of its steps runscripts/install.shagainst real GitHub release assets. The script'scurl -fsSLmakes one attempt, so a single release-CDN 504 fails the job andci-okwith it. On 2026-11-09 this happened twice during the same GitHub release-download outage (~05:38–05:47 UTC):fix/user-patched-deps-pnpm-yarn-vlt):Downloading SHA256SUMS... curl: (22) ... 504SHA256SUMSDuring that outage the same 504s also failed the vexctl download (#2039 fixes that) and the
ruby/setup-rubydownloads in two e2e legs. In the merge queue, each of these failures would evict an entry.Root cause
The test reaches the live network on purpose, because it checks the real latest release end to end. But the download has no tolerance for transient errors.
Fix
A new step writes
$RUNNER_TEMP/curl-retry/.curlrccontainingretry = 7. The threesh scripts/install.shinvocations run withCURL_HOMEpointing there, and curl reads its config from that directory. That gives the installer's curl a retry with exponential backoff (~2 min in all) on transient errors only: timeouts and HTTP 408/429/5xx. A 404, a missing checksum entry or a checksum mismatch still fails immediately. The probe'scurl -sfI -m 20in the Socket-origin step is not affected.scripts/install.shis not changed: install.socket.dev must serve a byte-for-byte copy of it (installer-drift.yml), so changing it needs a depscan redeploy. Adding--retryto the user-facing installer may be worth doing separately, as a coordinated change.Proof
Local repro: a server that answers 504 three times and then 200. Plain
curl -fsSLexits 22. WithCURL_HOMEpointing at theretry = 7.curlrc, curl retries and exits 0 with the body (curl 8.5.0; ubuntu-24.04 runners ship the same 8.5.x).The full
CURL_HOME=... sh scripts/install.shinstalls the latest release locally.actionlint: same 175 findings before and after, none new.zizmor --offline: 54 findings before and after. YAML parses.python3 -m unittest discover -s scripts/tests: 411 tests OK.On this PR's CI, during the ongoing release-download degradation: attempt 1 (job 129039901803) got 504s on all 8 tries over ~2.3 min and failed. Attempt 2 (job 129042262806) got 504s on 6 tries (07:51:39 → 07:52:10), then installed on the 7th and passed. All three installer steps succeeded. Without this change, that run would have failed on the first 504 as well.
Tests moved or removed
None. Every step runs where it ran before. Job and check names are unchanged.
https://claude.ai/code/session_011f9aeSwgKAzXeLTNSLn5pg
Generated by Claude Code