Skip to content

Decouple CI Go version from go.mod#674

Merged
rdimitrov merged 2 commits into
mainfrom
decouple-go-version-from-ci
Apr 8, 2026
Merged

Decouple CI Go version from go.mod#674
rdimitrov merged 2 commits into
mainfrom
decouple-go-version-from-ci

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

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

Switch all CI workflows from go-version-file: 'go.mod' to
go-version: 'stable' so CI always uses the latest stable Go
release. This eliminates mechanical patch-bump PRs and ensures
shipped artifacts (binaries, images) include all Go security
patches automatically.

The go.mod go directive continues to declare the minimum Go
version required by the module, which is what matters for the
enterprise go.work workspace and downstream consumers.

This also fixes the failing govulncheck CI — the stdlib
vulnerabilities (GO-2026-4946, 4947, 4870, 4869, 4866, 4865)
are fixed in Go 1.26.2 which 'stable' will pick up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rdimitrov rdimitrov self-assigned this Apr 8, 2026
Add GO-2026-4771 (CVE-2026-33815) and GO-2026-4772 (CVE-2026-33816)
to the govulncheck exclusion list. Both affect pgproto3 server-side
message decoding (Bind.Decode, FunctionCall.Decode) and have no fixed
version yet. This project is a PostgreSQL client connecting to trusted
database servers, so the attack surface is minimal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rdimitrov rdimitrov merged commit e607a6f into main Apr 8, 2026
10 checks passed
@rdimitrov rdimitrov deleted the decouple-go-version-from-ci branch April 8, 2026 20:39
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.51%. Comparing base (732313a) to head (79ac8d4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #674      +/-   ##
==========================================
+ Coverage   60.49%   60.51%   +0.02%     
==========================================
  Files         101      101              
  Lines        9593     9593              
==========================================
+ Hits         5803     5805       +2     
+ Misses       3291     3290       -1     
+ Partials      499      498       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants