Conversation
FarnazBGH
approved these changes
Aug 27, 2026
ubuntu-22.04 is deprecated. Move to 24.04, which is what ubuntu-latest currently points at. 26.04 is still marked preview by actions/runner-images, so hold off on it for now.
Bump the go directive to 1.26.0 in all three modules (root, hack/tools, test/e2e) and the pinned toolchain to 1.26.7. Also make `make modules` tidy the test/e2e module, which was previously left out. golangci-lint v2.13.1 ships a staticcheck that prints package paths without quotes and reports deprecated struct fields by type rather than by expression, so both existing SA1019 exclusions for the CAPI v1beta1 deprecations stopped matching. Widen the regexes to accept either form. Preallocate crdMigratorSkipPhases for the new prealloc finding. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
make's `export` does not reach $(shell ...) calls evaluated at parse time, so `go list -m` (via get_go_version) and the `go env` lookups ran with GOTOOLCHAIN=auto rather than the pinned GOTOOLCHAIN. With the go directive now at 1.26.0, that made every make invocation download a go1.26.0 toolchain into GOMODCACHE. In CI this broke the Lint job: `make go-version` runs before actions/setup-go, so the stray toolchain landed in GOMODCACHE first and setup-go's cache restore then failed with `tar: Cannot open: File exists`. Without a warm module cache, building golangci-lint from source re-downloaded and sumdb-verified its whole dependency tree, which kept hitting sum.golang.org HTTP/2 INTERNAL_ERROR. These lookups do not need the module's own toolchain, so pin them to GOTOOLCHAIN=local. Co-Authored-By: Claude Opus 5 (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.
What this does
Moves the project to Go 1.26. Builds on the toolchain pinning already in
develop, so CI picks the new version up frommake go-versionautomatically.chore(ci): Ubuntu runners 22.04 → 24.04ubuntu-22.04is deprecated. 24.04 is whatubuntu-latestcurrently points at. 26.04 is still marked preview byactions/runner-images, so this holds off on it.chore(deps): Go 1.26.7, golangci-lint v2.13.1godirective →1.26.0in all three modules (root,hack/tools,test/e2e); pinned toolchain →1.26.7.make modulesnow also tidiestest/e2e, which was previously skipped — that module'sgodirective would otherwise drift.(…v1beta2.ClusterV1Beta1DeprecatedStatus).Conditions) rather than by expression. Both existingSA1019exclusions for the CAPI v1beta1 deprecations stopped matching as a result, surfacing 18 pre-existing deprecation warnings as failures. The regexes now accept either form.preallocfinding fixed:crdMigratorSkipPhasesinmain.go.Verification
make build,make lint(0 issues), andmake testall pass under go1.26.7, plusgo vet -tags e2e ./...in thetest/e2emodule and a build ofhack/tools. Nogo.sumchurn — the bump is thegodirective only.Note for reviewers
If you have an existing checkout, run
rm -f hack/tools/bin/*before building. Stale tool binaries compiled with go1.25 fail withpackage requires newer Go version go1.26—mockgenin particular. CI builds tools fresh, so it is unaffected.🤖 Generated with Claude Code