Decouple CI Go version from module minimum#726
Merged
Conversation
See also: #722 Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
There was a problem hiding this comment.
Pull request overview
Updates the module’s Go versioning strategy to separate the minimum supported Go version for consumers from the Go toolchain version used in CI/development, using Go’s native toolchain directive.
Changes:
- Lower the
godirective from1.25.5to1.25.0. - Add
toolchain go1.25.8to pin the intended CI/dev toolchain.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a Go version matrix to the test workflow using the oldstable and stable aliases from actions/setup-go. This validates compatibility across the two most recent Go release series without hardcoding versions or requiring manual updates. Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
kommendorkapten
approved these changes
Mar 30, 2026
Contributor
Author
|
@kommendorkapten - Thanks! I'll wait a couple of days before we merge it so the other folks from #722 can have time to look and provide feedback in case they have any 👍 |
This was referenced Apr 8, 2026
rdimitrov
added a commit
to stacklok/toolhive-registry-server
that referenced
this pull request
Apr 8, 2026
## Summary - Switch all CI workflows from `go-version-file: 'go.mod'` to `go-version: 'stable'` so CI always uses the latest stable Go release - Eliminates mechanical patch-bump PRs every time a new Go patch is released - Ensures shipped artifacts (binaries, images) always include the latest Go security patches - Fixes failing govulncheck CI — the stdlib vulnerabilities (GO-2026-4946, 4947, 4870, 4869, 4866, 4865) are fixed in Go 1.26.2 which `stable` picks up automatically ## Context We've been pinning Go to the patch version in `go.mod` (e.g., `go 1.26.1`), which couples the CI Go version to `go.mod` and requires a PR for every Go patch release. This decouples them: - **`go.mod`** declares the minimum Go version the module needs (unchanged for now — blocked on upstream dependencies like `toolhive` which also patch-pin) - **CI** always uses the latest stable Go, independent of what `go.mod` declares - **Enterprise `go.work`** continues to control the exact Go version for the workspace build Similar approach to theupdateframework/go-tuf#726. ### Follow-up (blocked on upstream) Once `toolhive` and other leaf dependencies drop their patch pins, we can also update `go.mod` to use `go 1.26` (minor only) + `toolchain go1.26.1`. Currently `go mod tidy` reverts this because `toolhive@v0.15.0` requires `go 1.26.1`. ## Test plan - [ ] CI passes on this branch with `go-version: 'stable'` - [ ] govulncheck passes (stdlib vulns fixed by Go 1.26.2) - [ ] Verify `govulncheck` workflow uses `go-version-input: 'stable'` correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
The following PR:
This follows Go's recommended pattern for libraries: declare the minimum supported version in go.mod and let consumers control their own toolchain. No toolchain directive or .go-version file needed.
Alternative approach to #722