Repository navigation
ci: make nsgo's pinned downloads ready before nsgo build - #2720
Merged
Merged
Conversation
nsgo build fetches the AppImage runtime (and Sparkle and WinSparkle when updates are on) with one GET and no retry, so a transient answer from GitHub's release storage (618 on 2026-11-30) failed the coop2d linux_x64 build and the release build tag check on unrelated pull requests. A composite action restores nsgo's download cache keyed on the NSGo version, fetches any missing pin with curl's retries, checks its SHA-256 and the pin against the NSGo source, and saves the cache at once.
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.
Summary
nsgo builddownloads the files it bundles by a pinned URL and SHA-256 (the AppImage runtimes for every Linux target with installers, Sparkle and WinSparkle when a project has updates).pinned.fetchin NSGo v0.4.0 (cmd/nsgo/updates.go, from line 252) uses a file already inos.UserCacheDir()/nsgo/downloads/<name>, and otherwise makes a single GET and fails the build on any answer but 200, with no retry. CI runners start with an empty cache, so every Linux build depended on one live request to GitHub's release storage.Evidence: GitHub answered
618forhttps://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-x86_64and failed jobs on pull requests that do not touch the build:Build the coop2d template (linux_x64)(job 142253003672:error linux_x64: AppImage's runtime: https://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-x86_64 answered 618) andVerify release build tag strips debug code(job 142252986124)Build the coop2d template (linux_x64)(job 142259387266)Verify release build tag strips debug code(job 142232879951)Build the coop2d template (linux_x64)(job 142294332478)Changes:
.github/actions/nsgo-downloads, a composite action: restores nsgo's download directory from the Actions cache (key: runner OS and arch, the NSGo version in the given go.mod, the requested pins), runsprefetch.sh, and saves the cache right away on a miss, so a later failure in the job still keeps the files.prefetch.shkeeps a file whose SHA-256 matches, fetches a missing one withcurl --retry 6 --retry-all-errors(plain--retrytreats HTTP errors such as 618 as permanent), verifies the SHA-256 and moves it to the name nsgo reads. It also checks each copied pin against the NSGo source of the version in use, so an NSGo update that moves a pin fails with the pin to change rather than falling back to nsgo's single request. nsgo verifies the SHA-256 again on read.coop2d-builds(linux_x64) intest.yml,release-build-taginexamples.yml, and eacheditorentry inrelease.yml(downloadsmatrix field: Sparkle on macOS, both AppImage runtimes on Linux, WinSparkle for Windows).quality.ymlonly builds Android, iOS and web, which fetch no pin.release.ymlnow also runs on pull requests that change the action..github/actions/*, so theactions/cachepins there stay current like the workflows'..agents/notes/implemented/process/2026-12-01-nsgo-pinned-downloads-ci.md.The lasting fix belongs in NSGo (retry in
pinned.fetch), which will be filed upstream separately.Related issue
None; CI failures on unrelated pull requests, evidence above.
Verification
actionlintpassesshellcheckpasses onprefetch.shprefetch.shrun locally against NSGo v0.4.0: fetched all four pins with matching SHA-256 into an empty directory, and a second run reported each as cachedbun run verify-notespassesScreenshots
None (CI only).