Repository navigation
Keep Go CI Build Caches Warm - #732
Merged
Merged
Conversation
Go test, lint, and release jobs share an immutable cache keyed by dependencies. A smaller workload can populate it without race or cross-compilation artifacts, leaving later jobs to rebuild without saving their results. Shared cached test results can also bypass the selected Postgres version. Separate shared module downloads from build archives scoped by runner, Go version, workload, database version, and race mode. Let one full-suite job populate the module archive and refresh build archives when Go, SQL, CI, or embedded asset inputs change. Restore compatible earlier builds so changed jobs reuse previously compiled dependencies. Include local composite actions in dependency update scans.
brandur
approved these changes
Nov 1, 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.
🤖 River UI's Go test, lint, and release jobs share setup-go's immutable, dependency-keyed cache. A smaller workload can populate it without the race or cross-compilation artifacts another job needs, leaving later runs to rebuild without saving their new artifacts. Sharing build archives across Postgres versions can also reuse successful test results without exercising the selected database version.
Adapt the cache policy from River's Go CI cache improvements: share module downloads across Go versions and workloads, let one full-suite job populate that archive, and scope build archives by runner, exact Go version, workload, Postgres version, and race mode. Include module metadata and Go, SQL, and CI inputs in the keys so changed jobs can save fresh artifacts while restoring compatible earlier builds.
Release builds additionally hash the frontend inputs for their embedded assets. Dependabot also scans the new local composite action. Test selection, race coverage, and job parallelism are preserved.
The first runs fill the new caches; speedups in River UI have not been measured yet.