Skip to content

chore(deps): update Go from 1.25.0 to 1.26.0 - #161

Merged
andrzej-stencel merged 4 commits into
elastic:mainfrom
andrzej-stencel:update-go-1.26
Nov 17, 2026
Merged

andrzej-stencel merged 4 commits into
elastic:mainfrom
andrzej-stencel:update-go-1.26

Conversation

@andrzej-stencel

@andrzej-stencel andrzej-stencel commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bumps the go directive in go.mod and dev-tools/v2tool/go.mod from 1.25.0 to 1.26.0.
  • Makes CI test with a patch release of that minor version (1.26.x), rather than the exact version in go.mod.

This is a library, so the directive is the minimum Go version that consumers need, not the toolchain they build with. 1.26.0 keeps that minimum at the oldest supported Go release. Elastic Agent, Beats and Fleet Server are moving to Go 1.27.4.

CI shouldn't be pinned to the minimum. Until now, setup-go read go.mod as an exact version, so CI ran on whatever the go line said (1.25.0 before this PR). The shared setup action now takes only major.minor from the go line and passes it to setup-go as a wildcard (1.26.x). setup-go uses a matching 1.26 release already cached on the runner image and downloads one only if there isn't one. Only the minor version is read, so CI isn't affected if a dependency update later rewrites the go line to a different patch.

Testing

  • The version step's sed expression gives 1.26 for go 1.26.0, go 1.26, go 1.26rc1 and CRLF line endings, under both BSD and BusyBox sed. If the go line is missing, the step fails with an error.
  • With Go 1.26.0: go mod tidy makes no changes; go vet ./..., go test -race ./... and mage check pass.
  • With Go 1.27.4, which consumers will build this module with: go vet ./... and go test -race ./... pass.

dev-tools/v2tool already fails to build on main (undefined: proto.ConnInfo), and its go.mod isn't tidy there either. This PR doesn't change that, and CI doesn't build that module.

Related issues

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrzej-stencel
andrzej-stencel requested a review from a team as a code owner November 16, 2026 13:07
@andrzej-stencel
andrzej-stencel requested review from samuelvl and removed request for a team November 16, 2026 13:07
Comment thread dev-tools/v2tool/go.mod Resolved
go.mod's go directive is the minimum Go version for users of this
library, so it stays at 1.26.0. setup-go read it as an exact version,
which made CI test with Go 1.26.0 rather than the current patch release.

Take only major.minor from the go directive and pass it to setup-go as
a wildcard (1.26.x) with check-latest, so CI always uses the newest
patch release of that minor version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrzej-stencel
andrzej-stencel requested a review from a team as a code owner November 16, 2026 13:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrzej-stencel andrzej-stencel changed the title Bump Go from 1.25.0 to 1.26.0 chore(deps): update Go from 1.25.0 to 1.26.0 Nov 16, 2026
# Conflicts:
#	.github/actions/setup/action.yml
@andrzej-stencel
andrzej-stencel merged commit a38b4c8 into elastic:main Nov 17, 2026
6 checks passed
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