From e6775d93381628c2149eeb257da0fe6c06efa987 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Nov 2026 07:43:24 +0000 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_011f9aeSwgKAzXeLTNSLn5pg --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caa975203..57e6d2442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -218,6 +218,20 @@ jobs: # shellcheck is pre-installed on ubuntu-latest. run: shellcheck --shell=sh scripts/install.sh + - name: Shell — retry the installer's release downloads + # The three installer steps below fetch real release assets from + # github.com, and install.sh's `curl -fsSL` makes one attempt, so + # any release-CDN 504 failed this job (and ci-ok with it): twice on + # 2026-11-09 alone. curl reads $CURL_HOME/.curlrc, so the steps + # that run install.sh point CURL_HOME here and retry transient + # errors (timeouts, 408/429/5xx) with exponential backoff, ~2 min + # in all; a 404 or a checksum mismatch still fails at once. This + # stays out of install.sh itself: install.socket.dev serves a + # byte-for-byte copy of it (installer-drift.yml). + run: | + mkdir -p "$RUNNER_TEMP/curl-retry" + printf 'retry = 7\n' > "$RUNNER_TEMP/curl-retry/.curlrc" + - name: Shell — run the installer end to end # shellcheck proves the script parses; this proves it installs. The # script is what install.socket.dev/patch serves and what the README @@ -227,7 +241,7 @@ jobs: # Installs the LATEST RELEASE, not this checkout — on a version-bump PR # that is deliberately the previous version. run: | - sh scripts/install.sh + CURL_HOME="$RUNNER_TEMP/curl-retry" sh scripts/install.sh command -v socket-patch socket-patch --version @@ -240,6 +254,7 @@ jobs: run: | SOCKET_PATCH_BASE_URL=https://github.com/SocketDev/socket-patch/releases \ SOCKET_PATCH_INSTALL_DIR="$RUNNER_TEMP/alt-origin" \ + CURL_HOME="$RUNNER_TEMP/curl-retry" \ sh scripts/install.sh "$RUNNER_TEMP/alt-origin/socket-patch" --version @@ -257,6 +272,7 @@ jobs: echo "install.socket.dev reports latest=$latest" SOCKET_PATCH_BASE_URL=https://install.socket.dev/patch/SocketDev/socket-patch/releases \ SOCKET_PATCH_INSTALL_DIR="$RUNNER_TEMP/socket-origin" \ + CURL_HOME="$RUNNER_TEMP/curl-retry" \ sh scripts/install.sh installed=$("$RUNNER_TEMP/socket-origin/socket-patch" --version | awk '{print $NF}') if [ "$installed" != "$latest" ]; then