Skip to content

chore(ci): build on go 1.26 so envtest tooling and dependabot bumps pass#17

Merged
Tombar merged 2 commits into
mainfrom
chore/ci-go-1.26-toolchain
Jun 7, 2026
Merged

chore(ci): build on go 1.26 so envtest tooling and dependabot bumps pass#17
Tombar merged 2 commits into
mainfrom
chore/ci-go-1.26-toolchain

Conversation

@Tombar

@Tombar Tombar commented Jun 7, 2026

Copy link
Copy Markdown
Member

Why

CI pinned setup-go to 1.24 while the toolchain around it moved on, breaking two classes of PRs:

What

  • go.mod: go 1.24.0go 1.26.0 (the Dockerfile already builds on golang:1.26 as of build(deps): Bump golang from 1.24 to 1.26 #6).
  • ci.yml: lint / manifests / test jobs use go-version-file: go.mod (the toolchain always matches the module — same approach the e2e job already uses).
  • Pin setup-envtest@release-0.21 (the controller-runtime release branch in go.mod) instead of @latest, to stop future floating-version breakage.

Verification

make test ✓ at go 1.26 (36 specs), go build ./... ✓, go mod verify ✓, setup-envtest@release-0.21 installs ✓, no manifest drift.

Unblocks the actions/setup-go v6 bump (#1) and the go_modules dependabot group (#7#11).

🤖 Generated with Claude Code

Tombar and others added 2 commits June 7, 2026 18:07
CI pinned setup-go to 1.24 while the toolchain around it moved on:

- `go install setup-envtest@latest` floats and now resolves to a version
  requiring go >= 1.26. Under actions/setup-go v6 (GOTOOLCHAIN=local) this
  hard-fails the test job; it only survived on v5 via GOTOOLCHAIN=auto
  silently downloading a newer toolchain.
- Dependabot go_modules bumps raise the go.mod `go` directive past 1.24,
  which made `go test -coverprofile` error with `go: no such tool covdata`.

Bump the go.mod `go` directive to 1.26.0 (Dockerfile already builds on
golang:1.26) and point ci.yml's lint/manifests/test jobs at
`go-version-file: go.mod` so the installed toolchain always matches the
module — same approach the e2e job already uses. Also pin
`setup-envtest@release-0.21` (the controller-runtime release branch in
go.mod) instead of @latest to stop future floating-version breakage.

Unblocks the actions/setup-go v6 bump and the go_modules dependabot PRs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tom Bar <martinloy.uy@gmail.com>
The golangci-lint-action downloads a prebuilt golangci-lint binary; the
v2.1.0 build ships compiled with an older Go and exits 3 ("can't parse
go.mod go directive") once go.mod declares go 1.26. (Locally `make lint`
hid this because go-install-tool recompiles golangci-lint with the host
toolchain.) Bump the pinned version in both ci.yml and the Makefile to
v2.12.2 and the action to v9. Runs clean (0 issues) on the codebase.

Subsumes the actions bump in dependabot #3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tom Bar <martinloy.uy@gmail.com>
@Tombar

Tombar commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Added a third commit: bump golangci-lint v2.1.0 → v2.12.2 and golangci-lint-action @v8@v9. The action downloads a prebuilt golangci-lint binary, and the v2.1.0 build (compiled with older Go) exits 3 on go.mod go 1.26. make lint hid this locally because the Makefile recompiles golangci-lint with the host toolchain. Runs clean (0 issues). This subsumes dependabot #3 (the action v8→v9 bump) — I'll close #3 once this lands.

@Tombar Tombar merged commit 126fda1 into main Jun 7, 2026
7 checks passed
@Tombar Tombar deleted the chore/ci-go-1.26-toolchain branch June 7, 2026 21:54
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.

1 participant