ci(dispatch): retry the sesh install on transient release-fetch failures#38
Merged
Conversation
The repo's release.yml deletes and recreates the rolling release on every push to main (delete tag, rebuild assets, republish). For the few seconds that rebuild takes, releases/latest/download/<asset> returns 404. A dispatch run whose install step lands in that window dies on a transient 404, as run 28070847550 did: the install step hit 404 at 02:25:03, two seconds before the release was republished at 02:25:05. install.sh is the public installer and keeps its conservative no-retry curl flags (correct for one-shot user installs). The race tolerance belongs in the dispatch workflow, where concurrent workflows against the same rolling release actually happen. Retry only transient fetch failures: curl exit 22 (HTTP error, e.g. 404) and 18 (partial transfer). A checksum mismatch is deterministic and is NOT retried (a corrupt or tampered download must fail loudly). Five attempts, 10s between, then fail. Verified by simulating the control flow: 404-then-success recovers; checksum mismatch aborts immediately; persistent 404 exhausts then fails; happy path no retry. build/vet green; no em dashes per AGENTS.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #none (CI reliability fix, no issue).
Problem
The dispatch workflow intermittently fails at the install-sesh step with
curl: (22) ... 404onreleases/latest/download/sesh-linux-amd64. Root cause is a race withrelease.yml: that workflow deletes and recreates the rolling release on every push to main, and for the few seconds the rebuild takes the asset URL 404s. A dispatch run whose install step lands in that window dies on a transient 404. Observed in run 28070847550: install 404 at 02:25:03, release republished at 02:25:05 (2s later).Changes
.github/workflows/dispatch.yml: theInstall seshstep now runsinstall.shin a retry loop (5 attempts, 10s apart) only for transient fetch failures: curl exit 22 (HTTP error, e.g. 404) and 18 (partial transfer). A checksum mismatch or any other failure is non-transient and aborts immediately with no retry.install.shitself is untouched: it is the public installer and its conservative no-retry curl flags are correct for one-shot user installs. The race tolerance belongs in the dispatch workflow, where concurrent workflows against the same rolling release actually happen.How to test
Verification
go build ./... && go vet ./...pass (no Go touched). YAML valid, 12 steps. Retry logic simulated across 5 cases. No em dashes per AGENTS.md.