Fix poisoned Go cache in CI - #395
Merged
Merged
Conversation
setup-go's built-in cache keys on go version + nebula/go.sum alone, so gofmt, gotest, smoke, and release all compute the same per-OS key. Caches are immutable and first-save-wins, and gofmt finishes first on Linux, so gotest restores a goimports-only cache and compiles the nebula tree cold each run (the current Linux entry is 27 MiB next to a 232 MiB macOS one). Disable the built-in cache and give gotest and the smoke jobs explicit caches with per-job, per-commit keys (a fresh cache including GOCACHE saves every run, with restore-keys warming from the previous commit) and gofmt a static per-workflow key. Tag-triggered release runs get no cache.
johnmaguire
marked this pull request as ready for review
August 3, 2026 21:19
jasikpark
approved these changes
Aug 3, 2026
jasikpark
left a comment
Contributor
There was a problem hiding this comment.
Faithful extension of api#2220's Go-cache fix to this repo's shape (4 workflows, 5 setup-go call sites). Verified: distinct cache-key prefixes per job (gofmt-go-/gotest-go-/smoke-android-go-/smoke-ios-go-, no collisions), OS-correct build-cache paths (~/.cache/go-build on ubuntu, ~/Library/Caches/go-build on macos runners), and release.yml deliberately drops to no-cache (cache: false, no restore) rather than racing the shared key — reasonable given it only runs on version-tag pushes. fluttercheck.yml/swiftfmt.yml correctly left untouched, neither uses setup-go. CI green across gofmt, Go tests, and both smoke builds.
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.
No description provided.