From d620e9e72c6ff093c43af408a4a26b7121a35cf0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Oct 2026 11:53:39 +0000 Subject: [PATCH] Retry the Deno install in the deno test image The nightly coverage-docker (deno) job failed on 2026-10-28 because the Deno install script's release-zip download stalled for 14 minutes at 8% and then died with "curl: (56) Connection reset by peer". The script has no retry of its own, so one CDN blip failed the whole image build and turned the nightly CI run red. Wrap the install in the same 3-attempt loop Dockerfile.npm uses for bun, cap each attempt at 5 minutes so a stall still leaves room for a retry inside the job's 30-minute budget, clear the partial ~/.deno between attempts, and require the deno binary to exist before breaking out (a failed fetch of install.sh pipes nothing into sh, which exits 0). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_011f9aeRq7topfPoVB2zUn1A --- tests/docker/Dockerfile.deno | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/docker/Dockerfile.deno b/tests/docker/Dockerfile.deno index eeb0ae40b..dfcda7702 100644 --- a/tests/docker/Dockerfile.deno +++ b/tests/docker/Dockerfile.deno @@ -21,8 +21,22 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && rm -rf /var/lib/apt/lists/* # Deno install script defaults to ~/.deno/bin. Symlink onto PATH so -# `deno` works from any shell (test scripts use bash -c). -RUN curl -fsSL https://deno.land/install.sh | sh -s -- -y \ +# `deno` works from any shell (test scripts use bash -c). Retried like +# bun in Dockerfile.npm: the script downloads the release zip with no +# retry of its own, and one stalled download (14 min at 8%, then +# "curl: (56) Connection reset by peer") failed the whole image build. +# Each attempt is capped at 5 min so a stall leaves time for a retry +# inside the job's 30 min budget; a healthy install takes seconds. The +# binary check catches a failed script fetch, which pipes nothing into +# `sh` and so exits 0. +RUN for i in 1 2 3; do \ + timeout 300 sh -c 'curl -fsSL https://deno.land/install.sh | sh -s -- -y' \ + && [ -x /root/.deno/bin/deno ] && break; \ + [ "$i" = 3 ] && exit 1; \ + echo "deno install attempt $i failed; retrying in $((i * 10))s"; \ + rm -rf /root/.deno; \ + sleep $((i * 10)); \ + done \ && ln -s /root/.deno/bin/deno /usr/local/bin/deno RUN node --version && deno --version && socket-patch --version