Repository navigation
ci(release): retry transient github reads in release scripts - #320
Merged
Merged
Conversation
Automatic promotion failed on 502s and cut-off JSON from the GitHub API. GET calls and paginated reads now retry transient failures with backoff; writes never retry, since a failed dispatch may still have started a run.
nixuuu
added a commit
that referenced
this pull request
Nov 8, 2026
…374) ## Change `v0.2.0-nightly.107` became public at 20:50:02 UTC, but its desktop channel manifests arrived at 20:53:16. A scheduled update check during that interval selected the previous version and waited another hour. Keep releases as drafts while staging server binaries, desktop installers, blockmaps, cumulative channel feeds, checksums and the final manifest. Require the macOS arm64, Linux x64 and Windows x64 targets, plus complete metadata for an included experimental Linux arm64 build. Verify every uploaded file's state, size and SHA-256 through paginated GitHub API reads before a single publication PATCH. Stable can become latest at that point; beta/nightly cannot. Semantic-release creates drafts and its GitHub `addChannel` hook is disabled because that hook can publish directly despite `draftRelease`. Beta/stable promotions rebuild their own versions through the same publication barrier. Image aliases move afterward; back-merge and hygiene depend on completed publication. Mobile still runs its separate EAS/TestFlight/OTA pipeline after a successful Release. Interrupted uploads resume the same draft and skip matching files. Published releases are never clobbered on reruns, including a lost publication response or a later image-alias failure. Shared transient-read retries from #320 remain intact; exhausted reads fail closed instead of being treated as a missing release. Desktop polling stays unchanged: draft visibility removes the race for existing clients without changing their saved check schedule. Server updates and channel image aliases now wait for required desktop builds too. Failed drafts remain available for retries and are excluded from existing retention. Related: #14 Related: #320 ## Verification - `bun install` - `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check` - `bun test scripts/release.test.ts scripts/release-upload.test.ts`: 21 passed, covering channel visibility, promotion versions, missing platforms/feeds/blockmaps, upload interruption, verification failures and publication-response loss. - `bun run check:tmp`: 1852 passed, 161 skipped, 0 failed across 328 files; no project files left in its private temp directory. Live tests remained opt-in. - `bun run --cwd apps/web build`; `mise exec [email protected] [email protected] -- actionlint` Release/promotion workflows were not dispatched. No GitHub releases or tags were created or edited. Actual GitHub publication and platform signing remain pipeline validation; local tests use isolated fixtures. Polish release/update documentation describes the publication rule and retry behavior.
This was referenced Nov 13, 2026
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.
Automatic promotion failed in 5 of the last 8 scheduled runs on transient GitHub API errors:
gh: Server Error (HTTP 502)on run/job lookups andunexpected end of JSON inputfrom a paginatedcommits/<sha>/pullsread. The scripts made each call once, so one bad response failed the whole promotion.scripts/release-github.ts(shared by promote, backmerge and release-upload) now retries GET calls and paginated reads on transient failures (HTTP 5xx, cut-off JSON, timeouts, connection resets) after 2, 5, 15 and 30 s. Other errors (404, auth) fail at once as before. Writes (POST/dispatch) never retry: a failed dispatch may still have started a release.Verified with a fake
ghthat returns a 502, then a cut-off body, then data: the read succeeds on the third try; a 404 fails immediately.scripts/promote.test.tspasses; typecheck, lint and format are clean.Copy audit: no UI text changed.