diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51f10fe..b790216 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,11 +206,15 @@ jobs: 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. + # for an expired signed link, which only --retry-all-errors retries, or stall, which only + # --speed-limit ends. The grep fails the release if the template's download line changes. + # TODO(COD-4523): revisit this patch and `allow-dirty` when installers download from our CDN. - 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 + installer=target/distrib/codspeed-go-runner-installer.sh + flags='--retry 5 --retry-all-errors --connect-timeout 30 --speed-limit 1 --speed-time 30' + sed -i "s/curl -sSfL /curl -sSfL $flags /" "$installer" + grep -qF "curl -sSfL $flags \"\$1\" -o \"\$2\"" "$installer" - name: "Upload artifacts" uses: actions/upload-artifact@v6 with: diff --git a/dist-workspace.toml b/dist-workspace.toml index 22b7687..29c863d 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -19,5 +19,6 @@ install-path = "CARGO_HOME" 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. +# `dist generate`, then restore that step and this line. +# TODO(COD-4523): revisit the patch when installers download from our CDN. allow-dirty = ["ci"]