Skip to content

Commit e6775d9

Browse files
committed
Retry release 504s in lint-ecosystems installs
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
1 parent 568e376 commit e6775d9

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,20 @@ jobs:
218218
# shellcheck is pre-installed on ubuntu-latest.
219219
run: shellcheck --shell=sh scripts/install.sh
220220

221+
- name: Shell — retry the installer's release downloads
222+
# The three installer steps below fetch real release assets from
223+
# github.com, and install.sh's `curl -fsSL` makes one attempt, so
224+
# any release-CDN 504 failed this job (and ci-ok with it): twice on
225+
# 2026-11-09 alone. curl reads $CURL_HOME/.curlrc, so the steps
226+
# that run install.sh point CURL_HOME here and retry transient
227+
# errors (timeouts, 408/429/5xx) with exponential backoff, ~2 min
228+
# in all; a 404 or a checksum mismatch still fails at once. This
229+
# stays out of install.sh itself: install.socket.dev serves a
230+
# byte-for-byte copy of it (installer-drift.yml).
231+
run: |
232+
mkdir -p "$RUNNER_TEMP/curl-retry"
233+
printf 'retry = 7\n' > "$RUNNER_TEMP/curl-retry/.curlrc"
234+
221235
- name: Shell — run the installer end to end
222236
# shellcheck proves the script parses; this proves it installs. The
223237
# script is what install.socket.dev/patch serves and what the README
@@ -227,7 +241,7 @@ jobs:
227241
# Installs the LATEST RELEASE, not this checkout — on a version-bump PR
228242
# that is deliberately the previous version.
229243
run: |
230-
sh scripts/install.sh
244+
CURL_HOME="$RUNNER_TEMP/curl-retry" sh scripts/install.sh
231245
command -v socket-patch
232246
socket-patch --version
233247
@@ -240,6 +254,7 @@ jobs:
240254
run: |
241255
SOCKET_PATCH_BASE_URL=https://github.com/SocketDev/socket-patch/releases \
242256
SOCKET_PATCH_INSTALL_DIR="$RUNNER_TEMP/alt-origin" \
257+
CURL_HOME="$RUNNER_TEMP/curl-retry" \
243258
sh scripts/install.sh
244259
"$RUNNER_TEMP/alt-origin/socket-patch" --version
245260
@@ -257,6 +272,7 @@ jobs:
257272
echo "install.socket.dev reports latest=$latest"
258273
SOCKET_PATCH_BASE_URL=https://install.socket.dev/patch/SocketDev/socket-patch/releases \
259274
SOCKET_PATCH_INSTALL_DIR="$RUNNER_TEMP/socket-origin" \
275+
CURL_HOME="$RUNNER_TEMP/curl-retry" \
260276
sh scripts/install.sh
261277
installed=$("$RUNNER_TEMP/socket-origin/socket-patch" --version | awk '{print $NF}')
262278
if [ "$installed" != "$latest" ]; then

0 commit comments

Comments
 (0)