Repository navigation
fix(release): retry the installer's archive download - #72
Conversation
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
[Medium impact] The PR appears safe to merge; no actionable defect was established. SummaryThe release workflow adds
Reviews (2) · Last reviewed commit: "fix(release): retry the installer's arch..." · Reviewed by Greptile |
Merging this PR will not alter performance2 warnings
Comparing Footnotes
|
GitHub Releases now sometimes answers downloads with HTTP 618: github.com serves a cached redirect whose signed link has already expired, and only a new request to the release URL gets a fresh link (root cause).
The cargo-dist installer downloads the go-runner archive with a single
curl -sSfL, so one 618 or 5xx fails the install. The CodSpeed CLI runs this installer throughgo.shfor every Go walltime run. The release build now adds--retry 5 --retry-all-errorsto that call (step "Retry the installer's archive download" inrelease.yml). Each retry starts again at github.com. Installers from the next release on have it.dist offers no way to change the installer, so
release.ymlis now edited by hand, andallow-dirty = ["ci"]keepsdist generatefrom overwriting it. To regenerate it after a dist bump, drop that line, rundist generate, then restore the step. This is the same change as CodSpeedHQ/codspeed#640 makes for the CLI installer.Verification
PRs here only run
dist plan, so CI doesn't build the installer. Checked locally instead:sedand run with dash against a local fake of github.com: an expired link, a 502, a reset and a truncated archive in a row recovered after 15 s, and six expired links failed after 31 s.dist planpasses with the editedrelease.yml, anddist generateleaves it alone.If the generated installer ever stops matching the
sed, thegrepfails the release build before anything is published.Decisions
--retry-all-errors: it needs curl 7.71 (June 2020). In the last 28 days of CodSpeed uploads, every system shipped a newer curl: Ubuntu 22.04 and later, Debian 12 and 13, macOS, Arch, Amazon Linux 2023.Refs COD-4520