Pin the Go version for release builds - #380
Merged
Merged
Conversation
mbyczkowski
marked this pull request as ready for review
September 28, 2026 20:12
mbyczkowski
enabled auto-merge
September 28, 2026 20:12
randradesq
approved these changes
Sep 30, 2026
mbyczkowski
force-pushed
the
mbyczkowski/pin-release-go-version
branch
from
September 30, 2026 21:07
ef8ed56 to
a078b95
Compare
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.
Why
The release workflow builds the binaries with
go-version: stable. That means the Go version is whatever is newest on the day a tag is pushed. v1.18.0 got Go 1.26.2 and v1.18.1 got Go 1.27.1, and nothing in the repo shows or controls that choice.The
go 1.25.0line ingo.moddoesn't help here. It is only the oldest Go that can build certigo, not the compiler the release uses.What
release.yamlbuilds the binaries with exactly Go 1.27.1, the version that built v1.18.1.compilecheck.yamluses the same version, so PRs are checked with the release toolchain.GOTOOLCHAIN=local.How
actions/setup-gov5.5.0 does not setGOTOOLCHAIN, and Go defaults toauto. Withauto, a dependency bump can raise thegoline ingo.modabove the installed version. Go then downloads a newer toolchain and builds with it, so the pin alone would not hold.GOTOOLCHAIN=localmakes the build fail with a clear error instead. Compile Check shows that failure on the PR that caused it, before anything is tagged.check-latest: trueis gone because it does nothing for an exact version.Risk
Low. Only CI changes. The release workflow runs only on tag pushes, so this PR can't exercise it; the next tag will.
The Compile Check job names change from
(stable, …)to(1.27.1, …). They are not required checks.test.yamlandlint.yamlstill usestable, so unit and integration tests keep running on the newest Go.Testing
I ran the release build step locally with Go 1.27.1,
GOTOOLCHAIN=localandCGO_ENABLED=0for linux/amd64, darwin/arm64 and windows/amd64. All three built, andgo version <binary>showsgo1.27.1.I checked the guard in a scratch copy with
go.modraised togo 1.28.0:GOTOOLCHAIN=local go build .fails withgo: go.mod requires go >= 1.28.0 (running go 1.27.1; GOTOOLCHAIN=local).GOTOOLCHAIN=auto go build .tries to switch:go: downloading go1.28.0 (darwin/arm64).actionlintv1.7.12 reports no issues in either file.Bigger picture
The pin does not move on its own. Dependabot here only updates Go modules. Bump the version in both files when a Go release has fixes you want in the binaries. A PR that raises the
goline above the pin must bump the pin too.Generated with Claude Code