Skip to content

chore: Build on the Go 1.27 toolchain - #595

Merged
ecv merged 2 commits into
mainfrom
chore/go-1.27-toolchain
Nov 2, 2026
Merged

ecv merged 2 commits into
mainfrom
chore/go-1.27-toolchain

Conversation

@ecv

@ecv ecv commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Go 1.26 stops getting security fixes in February 2027. This builds and tests on Go 1.27, with runtime behaviour unchanged (the go.mod go line stays at 1.26.4).

  • Build images (Dockerfile, ui/consumer/Dockerfile) and the devcontainer move to golang:1.27
  • go.mod gains toolchain go1.27.3, which actions/setup-go uses over the go line, so every go-version-file: go.mod job runs 1.27.3
  • golangci-lint moves from v2.12.2 to v2.15.0 (Makefile and lint workflow), since v2.12 is built with Go 1.26 and refuses a 1.27 toolchain

This is step 1 of https://github.com/datum-cloud/infra/issues/8340 per the Go upgrade guide. Raising the go line is a separate step 2.

Test plan

  • Every job's Setup Go step installs 1.27.3
  • Unit, e2e and lint pass on 1.27
  • The service rolls in staging and stays healthy

Related to #594

Lint findings left for owners

golangci-lint v2.14 and later are the first releases that can type-check the Go 1.27.3 standard library (v2.13 cannot), so this moves to v2.15 and clears what its newer checks report:

  • controller-runtime Result.Requeue deprecation is excluded rather than fixed. Moving to RequeueAfter changes how the controllers retry, so it belongs in its own change by the owners.
  • errcheck on channel receives in tests is excluded: staticcheck rejects the _ = assignment errcheck would want.
  • SA4006 on attachmentMethod in internal/validation/instance_validation.go is excluded: the counter is scaffolding for more attachment methods, and removing it is a code decision for the owners.
  • One controller file is reformatted under the Go 1.27 gofmt.

ecv added 2 commits November 2, 2026 07:56
Go 1.26 stops getting security fixes when Go 1.28 ships in February 2027.
Building on 1.27 now keeps the binaries patched and the fleet on one Go line.

Key features/changes:
- Move the build images and the devcontainer to golang:1.27
- Add a go.mod toolchain line, which actions/setup-go uses over the go line,
  so CI also builds and tests on 1.27
- Move golangci-lint to v2.15.0, built with Go 1.27, because v2.12 refuses a
  1.27 toolchain
- Leave the go line unchanged, so the binaries keep their current GODEBUG
  runtime defaults; raising it is a separate change
golangci-lint v2.14 and later are the first releases that can type-check the
Go 1.27.3 standard library, and they bring a newer staticcheck, errcheck and
goconst, and the Go 1.27 gofmt. This clears what they report so the toolchain
move can merge with lint green.

Key features/changes:
- Exclude the controller-runtime Result.Requeue deprecation; moving to
  RequeueAfter changes how controllers retry, so it is left to the owners
- Exclude errcheck on channel receives in tests, where staticcheck rejects
  the blank assignment errcheck would otherwise want
- Reformat files whose alignment changed under the Go 1.27 gofmt
- Exclude the per-repo findings listed in the pull request body for owners
  to resolve
@ecv
ecv marked this pull request as ready for review November 2, 2026 17:16
@ecv
ecv requested a review from a team as a code owner November 2, 2026 17:16
@ecv
ecv enabled auto-merge November 2, 2026 17:16

@kevwilliams kevwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified every workflow reads go.mod and lint set up Go 1.27.3, and no Go 1.26 pin remains in any image or workflow.

@ecv
ecv merged commit d2661b1 into main Nov 2, 2026
11 checks passed
@ecv
ecv deleted the chore/go-1.27-toolchain branch November 2, 2026 17:24
@ecv
ecv requested a review from kevwilliams November 2, 2026 17:47
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.

2 participants