Skip to content

Bump Go to 1.26.0 - #13090

Merged
samuelkarp merged 1 commit into
containerd:mainfrom
SergeyKanzhelev:go126
Apr 1, 2026
Merged

samuelkarp merged 1 commit into
containerd:mainfrom
SergeyKanzhelev:go126

Conversation

@SergeyKanzhelev

@SergeyKanzhelev SergeyKanzhelev commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

This change updates the Go version from 1.25.8 to 1.26.0 across the repository, including CI configurations, build scripts, and development environments.

This is part of #13076

I am not sure how this can satisfy the requirement to build on 1.25 since go.mod is bumped to 1.26 for k8s depdendencies

@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Mar 22, 2026
@dosubot dosubot Bot added the area/toolchain Build and Release Toolchain label Mar 22, 2026
@mxpv

mxpv commented Mar 23, 2026

Copy link
Copy Markdown
Member

Vagrant jobs fail with:
./container_checkpoint_test.go:391:45: (*testing.common).Fatalf format %q has arg status of wrong type github.com/containerd/containerd/v2/client.Status
You might want to cover this in #13089

Comment thread BUILDING.md

To build the `containerd` daemon, and the `ctr` simple test client, the following build system dependencies are required:

* Go compiler (download from https://go.dev/dl/). The two most recent major Go versions are supported. For example, if Go 1.25 is the latest, then 1.25 and 1.24 are supported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added this change to highlight that this will not be true since go.mod bumps to 1.26.

@SergeyKanzhelev
SergeyKanzhelev force-pushed the go126 branch 2 times, most recently from e2282e1 to 2365f4a Compare March 23, 2026 17:15
@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

@dims @mikebrow @samuelkarp as we want to pick up 1.36 packages, this is a prerequisite. And it changes the toolchain and BUILDING.md declaration of golang support. Are we all good with this?

"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.25.8"
"version": "1.26.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why 1.26.0, and not 1.26.1 ?

I don't think we need to test older patch releases (more so because 1.26.1 was a security release)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mostly to align with k8s. But there is no harm in bumping to 1.26.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@thaJeztah Have you already tested Docker or runc with 1.26? I'm curious if there are any container-related regressions found yet (since that seems to happen with relative frequency in new Go versions).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mostly to align with k8s. But there is no harm in bumping to 1.26.1

Does anything in the k8s stack import from containerd? IOW if containerd go.mod minimums with 1.26.1 ..

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Side question... wondering if we know the status of John's change to support lower minimums in the staging repos.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NVM talked to John.. He suggests Jordan/Dims/Sergey figure it out :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wait; why didn't we bump to go1.26.1 (CI that is; the go module shouldn't specify patch versions).

This would mean we'd build with a go version that has vulnerabilities.

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

Rebased. Realistically k8s will not change how staging golang toolchain is declared in 1.36 (@dims, please correct me if it is still a feasibility). So we need to decide if we want to bump k8s dependency in 2.3 or wait for 2.4. I think keeping dependencies in sync with k8s is the best way forward. If so - it's best to merge this PR soon to find any issues.

@dims

dims commented Mar 24, 2026

Copy link
Copy Markdown
Member

Realistically k8s will not change how staging golang toolchain is declared in 1.36

correct! unfortunately it was too late to do all the things we needed :( we can do it for 1.37

This change updates the Go version from 1.25.8 to 1.26.0 across the
repository, including CI configurations, build scripts, and development
environments.

It also fixes two linter issues discovered after upgrading the Go version:
- core/snapshots/storage/bolt.go: incorrect printf format for uint64
- plugins/transfer/plugin.go: incorrect printf format for int and unused variable

The golangci-lint version in script/setup/install-dev-tools is also updated to v2.9.0
to match CI.

Signed-off-by: Sergey Kanzhelev <[email protected]>
@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

@mxpv @mikebrow @dims @samuelkarp should we take this?

Realistically, if we want 1.36 dependencies, we need to take this PR and start adopting 1.36 dependencies after.

@dims

dims commented Mar 31, 2026

Copy link
Copy Markdown
Member

Realistically, if we want 1.36 dependencies, we need to take this PR and start adopting 1.36 dependencies after.

I agree, we'll need to switch to pull in k8s 1.36.0.

@dims

dims commented Mar 31, 2026

Copy link
Copy Markdown
Member

@SergeyKanzhelev

SergeyKanzhelev commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor Author

@SergeyKanzhelev remember, we are just around the corner for 1.26.2 though ... https://groups.google.com/g/golang-dev/c/_BQQdj4Z-6c/m/IgDjtMiNBgAJ

sure, there is also some other fix I lost link for on Windows. But we can simply align to whatever k8s 1.36 will be taking.

With this first step we can make other PRs on adopting 1.36 dependencies smaller

@samuelkarp

Copy link
Copy Markdown
Member

should we take this?

I was hoping @thaJeztah would have some data on whether he found any incompatibilities yet, but we probably should since it's passing our CI.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Mar 31, 2026
@samuelkarp
samuelkarp added this pull request to the merge queue Mar 31, 2026
Merged via the queue into containerd:main with commit 40249d1 Apr 1, 2026
54 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Apr 1, 2026
@SergeyKanzhelev
SergeyKanzhelev deleted the go126 branch April 1, 2026 01:16
@thaJeztah

Copy link
Copy Markdown
Member

Sorry, thought I commented; but no data yet; we have a draft PR in moby to test go1.26, but have not yet shipped a release with.

Comment thread go.mod
module github.com/containerd/containerd/v2

go 1.25.0
go 1.26.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technically we could've kept this at go1.25.0 until something forces us to update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted this as a first step for #13076 in preparation for 2.3 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/toolchain Build and Release Toolchain size/S

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants