diff --git a/.ngit/act/workflows/deploy-nsite.yml b/.ngit/act/workflows/deploy-nsite.yml index 90e8c24b..5efea2e5 100644 --- a/.ngit/act/workflows/deploy-nsite.yml +++ b/.ngit/act/workflows/deploy-nsite.yml @@ -51,17 +51,31 @@ jobs: # Pin the binary. An unversioned install has been observed pulling # 0.10.1, which emits legacy kind-34128 events that every current # gateway ignores while still reporting a successful deploy. - # --retry-all-errors covers the transport faults this download has - # actually hit here ("SSL_read: decryption failed or bad record - # mac"), which curl does not consider retryable on its own. -f keeps - # an HTTP error page from being saved as the binary, and the version - # check fails the step rather than letting a truncated download - # surface later as a confusing nsyte error. - curl -fsSL --retry 5 --retry-delay 3 --retry-all-errors --max-time 300 \ - -o /usr/local/bin/nsyte \ - https://github.com/sandwichfarm/nsyte/releases/download/v0.27.2/nsyte-linux-0.27.2 - chmod +x /usr/local/bin/nsyte - nsyte --version + # This 115 MB download is the single flakiest thing in the job: from + # this coordinator it fails perhaps half the time, mid-transfer, with + # "SSL_read: decryption failed or bad record mac". curl's own --retry + # is not enough because every attempt breaks the same way, so the + # whole fetch is retried in a loop, forcing HTTP/1.1 (the fault has + # the shape of an HTTP/2 framing problem) and proving the binary + # actually runs before accepting it. A truncated download otherwise + # surfaces much later as a confusing nsyte error. + # + # The durable fix is to bake nsyte into the coordinator's CI image, + # the way it already pre-bakes the other toolchains. + NSYTE_URL=https://github.com/sandwichfarm/nsyte/releases/download/v0.27.2/nsyte-linux-0.27.2 + ok="" + for attempt in 1 2 3 4 5; do + if curl -fsSL --http1.1 --retry 2 --retry-delay 5 --retry-all-errors \ + --connect-timeout 20 --max-time 900 -o /usr/local/bin/nsyte "$NSYTE_URL" \ + && chmod +x /usr/local/bin/nsyte \ + && nsyte --version; then + ok=yes + break + fi + echo "nsyte download attempt $attempt failed; retrying in 10s" + sleep 10 + done + test -n "$ok" || { echo "could not download a working nsyte after 5 attempts"; exit 1; } nsyte validate