Skip to content

fix(release): retry the installer's archive download - #72

Merged
fargito merged 1 commit into
mainfrom
cod-4136-retry-github-release-asset-downloads-when
Dec 1, 2026
Merged

fargito merged 1 commit into
mainfrom
cod-4136-retry-github-release-asset-downloads-when

Conversation

@fargito

@fargito fargito commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

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 through go.sh for every Go walltime run. The release build now adds --retry 5 --retry-all-errors to that call (step "Retry the installer's archive download" in release.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.yml is now edited by hand, and allow-dirty = ["ci"] keeps dist generate from overwriting it. To regenerate it after a dist bump, drop that line, run dist 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:

  • The v1.4.0 installer, patched with the same sed and 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 0.31.0: dist plan passes with the edited release.yml, and dist generate leaves it alone.

If the generated installer ever stops matching the sed, the grep fails 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.
  • 5 retries: the same budget as the CLI's own downloads. curl waits 1 s, doubling, 31 s in total. A 618 clears on the very next request.

Refs COD-4520

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
@fargito
fargito marked this pull request as ready for review December 1, 2026 13:00
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no actionable defect was established.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defect was established.

Summary

The release workflow adds --retry 5 --retry-all-errors to the generated installer's archive download before uploading it.

  • The Go runner installer retries archive downloads during release builds.

Reviews (2) · Last reviewed commit: "fix(release): retry the installer's arch..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Dec 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Unable to measure the execution of 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

✅ 50 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing cod-4136-retry-github-release-asset-downloads-when (b1d1fa9) with main (d004aae)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@fargito fargito closed this Dec 1, 2026
@fargito fargito reopened this Dec 1, 2026
@fargito
fargito merged commit b1d1fa9 into main Dec 1, 2026
42 checks passed
@fargito
fargito deleted the cod-4136-retry-github-release-asset-downloads-when branch December 1, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants