Skip to content

fix(release): retry downloads that GitHub answers with a 5xx - #672

Open
ion-alpha-dev wants to merge 1 commit into
mainfrom
fix/retry-release-downloads
Open

ion-alpha-dev wants to merge 1 commit into
mainfrom
fix/retry-release-downloads

Conversation

@ion-alpha-dev

Copy link
Copy Markdown
Collaborator

What

The downloads in dev/upgrade-check, dev/container-profiles and install.sh's curl path now pass --retry 5 --retry-delay so a transient answer from GitHub (408, 429, 5xx, a timeout) is retried instead of failing the job or the install.

Why

The v0.2.0 release run's Windows upgrade leg failed in 16 seconds on curl: (22) The requested URL returned error: 504 while downloading v0.1.3's assets, before it tested anything. For about an hour GitHub's release download host returned 504 for one v0.1.3 asset at a time while serving the others, and its status page showed no incident. The upgrade itself was fine: done by hand on Windows, v0.1.3 upgraded itself to v0.2.0 and reopened its data directory.

How to verify

  • Against a local server that answers 504 twice and then 200, curl -fsSL --retry 5 --retry-delay 1 made three requests and exited 0 with the body.
  • ./dev/upgrade-check v0.2.0 v0.1.3 from this branch on Windows: ok: v0.1.3 upgraded itself to v0.2.0 on windows/amd64 and opened its data directory.
  • sh -n passes on all three scripts and their executable bits are unchanged.

Notes for reviewers

  • --retry has been in curl since 7.12, so no installer user needs a newer curl. --retry-all-errors would need 7.71 and is not used.
  • The wget path in install.sh is unchanged because busybox wget has no retry option. install.ps1 is unchanged because Windows PowerShell 5.1's Invoke-WebRequest has no retry parameter; a retry loop there can be its own change if it proves needed.
  • The release workflow runs these scripts from the tagged commit, so the next tag's run is the first to use the fix.

The v0.2.0 release run's Windows upgrade leg failed in 16 seconds
because GitHub's release download host returned 504 for one of
v0.1.3's assets. For about an hour it answered 504 for one asset at a
time while serving the others, with no incident on its status page.
The upgrade itself was fine: run by hand it passed.

curl's --retry already treats 408, 429, 5xx and timeouts as transient,
so the downloads in dev/upgrade-check, dev/container-profiles and
install.sh's curl path now retry five times. The wget path in
install.sh is unchanged because busybox wget has no retry option, and
install.ps1 is unchanged because Windows PowerShell 5.1's
Invoke-WebRequest has no retry parameter.

Signed-off-by: Ion Alpha <contact@ionalpha.io>
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant