Skip to content

fix: retry the CLI installer download - #261

Merged
fargito merged 2 commits into
mainfrom
cod-4520-retry-installer-downloads
Dec 1, 2026
Merged

fargito merged 2 commits into
mainfrom
cod-4520-retry-installer-downloads

Conversation

@fargito

@fargito fargito commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

GitHub Releases sometimes answers HTTP 618 for an expired signed link (root cause). The installer download hit one in Ruff's CI, which failed before any benchmark ran.

The installer is now downloaded with curl --retry 5 --retry-all-errors, since plain --retry doesn't retry 618. Each retry starts again from codspeed.io, so GitHub issues a fresh link. latest and prereleases are downloaded the same way instead of being piped into bash: curl can send duplicate data down a pipe when it retries. When all 6 attempts fail:

Failed to download https://codspeed.io/v5.8.0/install.sh after 6 attempts: curl: (22) The requested URL returned error: 618.
The installer is hosted on GitHub Releases. Re-run the job, and check https://www.githubstatus.com if it keeps failing.

--retry-all-errors needs curl 7.71 (2020): no CodSpeed upload in the last 28 days came from an older system. scripts/check-hashes.sh retries the same way.

The installer then downloads the CLI archive from GitHub Releases. Installers from the next CLI release retry that download too (CodSpeedHQ/codspeed#640).

Builds on #260: 5 retries instead of 2, latest and prereleases covered, and an error that points to GitHub.

Checked against a local fake of GitHub: one expired link, and a 504 then an expired link for latest, both installed. Six expired links failed after 31 s with the error above.

Refs COD-4520

@fargito
fargito marked this pull request as ready for review December 1, 2026 13:00

@not-matthias not-matthias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll let @adriencaccia accept

Comment thread action.yml Resolved

@adriencaccia adriencaccia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fargito seen together, let's simplify and only have a retry on all errors, with an explicit error message when they all fail. And drop the test

@fargito
fargito requested a review from adriencaccia December 1, 2026 15:03

fargito commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

updated

GitHub Releases can redirect to a signed link that has already expired, and that link answers
HTTP 618, which `curl --retry` does not retry. One such answer failed the whole job before any
benchmark ran.

Download the installer with `curl --retry 5 --retry-all-errors`: each retry starts again from
codspeed.io, so github.com issues a fresh link. `latest` and prereleases are now downloaded the
same way instead of being piped into bash, since curl can send duplicate data down a pipe when it
retries. Once the retries run out, the error says the installer is hosted on GitHub Releases.

Refs COD-4520
check-installer-hashes failed 3 of its 72 downloads once on this PR, then
passed on a rerun: GitHub Releases fails transiently.

Refs COD-4520
@fargito
fargito force-pushed the cod-4520-retry-installer-downloads branch from d1aea3e to fa55c2f Compare December 1, 2026 15:23
@fargito
fargito merged commit fa55c2f into main Dec 1, 2026
40 checks passed
@fargito
fargito deleted the cod-4520-retry-installer-downloads branch December 1, 2026 15:24
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.

3 participants