Skip to content

chore: upgrade Go from 1.25.7 to 1.26.1#1477

Open
jsonmp-k8 wants to merge 6 commits intokagent-dev:mainfrom
jsonmp-k8:chore/go-1.26.1-upgrade
Open

chore: upgrade Go from 1.25.7 to 1.26.1#1477
jsonmp-k8 wants to merge 6 commits intokagent-dev:mainfrom
jsonmp-k8:chore/go-1.26.1-upgrade

Conversation

@jsonmp-k8
Copy link
Contributor

@jsonmp-k8 jsonmp-k8 commented Mar 11, 2026

Summary

  • Upgrade Go from 1.25.7 to 1.26.1 across all modules (go.work, go/adk/go.mod, go/api/go.mod, go/core/go.mod)
  • Go 1.26.1 includes security fixes, the Green Tea GC enabled by default, and reduced cgo overhead
  • Align actions/setup-go to v5 for all CI jobs (one job was still on v4)
  • Update golangci-lint config Go version to 1.26 for consistent type-checking
  • Bump golangci-lint from v2.8.0 to v2.11.3 (v2.8.0 was built with Go 1.25 and fails against Go 1.26 targets)
  • Fix modernize linter newexpr violations: replace ptr.To(x) with new(x) across 18 Go files (Go 1.26 language feature)
  • Remove unused ptrTo generic helper in hack/makeagentconfig/main.go
  • Fix copyloopvar violation: remove redundant loop variable copy in httpserver/handlers/modelconfig.go

Test plan

  • go vet passes on all modules
  • go mod tidy clean on all modules
  • golangci-lint run passes with 0 issues
  • Go unit tests pass
  • CI passes with Go 1.26

Update Go version across go.work, all go.mod files, and CI workflow.
Go 1.26.1 includes security fixes, the Green Tea GC enabled by default,
and reduced cgo overhead.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Copilot AI review requested due to automatic review settings March 11, 2026 03:25
One job still used actions/setup-go@v4 while the other two used v5.
Align to v5 for consistent behavior and Go 1.26 cache support.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the repository’s Go toolchain baseline across the workspace and modules, and updates CI to run with the new Go minor version.

Changes:

  • Bump go directives from 1.25.7 to 1.26.1 in the workspace and all Go modules.
  • Refresh go.sum files to include additional *.go.mod checksum entries.
  • Update GitHub Actions CI to use Go 1.26.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
go/go.work Update workspace Go version directive to 1.26.1.
go/core/go.mod Update module Go version directive to 1.26.1.
go/api/go.mod Update module Go version directive to 1.26.1.
go/adk/go.mod Update module Go version directive to 1.26.1.
go/api/go.sum Add missing *.go.mod checksum entries after tidy.
go/adk/go.sum Add missing *.go.mod checksum entries after tidy.
.github/workflows/ci.yaml Bump CI Go version from 1.25 to 1.26 across jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Align the golangci-lint config with the Go 1.26 upgrade so
type-checking and parsing match the CI toolchain.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
golangci-lint v2.8.0 was built with Go 1.25 and fails with:
"the Go language version (go1.25) used to build golangci-lint is lower
than the targeted Go version (1.26)"

v2.11.3 is built with Go 1.26 and resolves this.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Replace ptr.To(x) with new(x) per Go 1.26 modernize linter rules,
remove unused ptrTo helper, and delete redundant loop variable copy.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
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