From b1d1fa95f280e4cb72ae2fb9a3f5f9f131d817f2 Mon Sep 17 00:00:00 2001 From: fargito Date: Tue, 1 Dec 2026 12:57:48 +0000 Subject: [PATCH] fix(release): retry the installer's archive download The cargo-dist installer downloads the go-runner archive from GitHub Releases with a single `curl -sSfL`. GitHub can answer it with HTTP 618 for an expired signed link, which plain `--retry` does not retry, so one such answer fails the install. The release build now adds `--retry 5 --retry-all-errors` to that call. Each retry starts again at github.com, which issues a fresh link. `--retry-all-errors` needs curl 7.71: no CodSpeed upload in the last 28 days came from a system with an older curl. dist does not let us change the installer, so release.yml is now edited by hand and `allow-dirty` keeps `dist generate` from overwriting it. Refs COD-4136 --- .github/workflows/release.yml | 7 +++++++ dist-workspace.toml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9aa406..51f10fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -204,6 +204,13 @@ jobs: echo "EOF" >> "$GITHUB_OUTPUT" cp dist-manifest.json "$BUILD_MANIFEST_NAME" + # The generated installer downloads the archive with a single `curl` + # (https://github.com/axodotdev/cargo-dist/pull/2311). GitHub Releases can answer HTTP 618 + # for an expired signed link, which only --retry-all-errors retries. + - name: Retry the installer's archive download + run: | + sed -i 's/curl -sSfL /curl -sSfL --retry 5 --retry-all-errors /' target/distrib/codspeed-go-runner-installer.sh + grep -q -- --retry-all-errors target/distrib/codspeed-go-runner-installer.sh - name: "Upload artifacts" uses: actions/upload-artifact@v6 with: diff --git a/dist-workspace.toml b/dist-workspace.toml index 511008a..22b7687 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -17,3 +17,7 @@ targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-musl", "x86_64-unknown install-path = "CARGO_HOME" # Whether to install an updater program install-updater = false +# release.yml patches the generated installer (step "Retry the installer's archive download"), +# so `dist generate` must not overwrite it. To regenerate release.yml, drop this line, run +# `dist generate`, then restore that step. +allow-dirty = ["ci"]