Skip to content

update to go1.25.2#50313

Merged
vvoland merged 1 commit intomoby:masterfrom
thaJeztah:update_go1.25
Oct 13, 2025
Merged

update to go1.25.2#50313
vvoland merged 1 commit intomoby:masterfrom
thaJeztah:update_go1.25

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jul 2, 2025

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Update Go runtime to [1.25.2](https://go.dev/doc/devel/release#go1.25.2)

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

Interesting; what's this?

 > [gotestsum 1/1] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod         GOBIN=/build/ GO111MODULE=on go install "gotest.tools/gotestsum@v1.12.0"      && /build/gotestsum --version:
4.813 go: downloading github.com/bitfield/gotestdox v0.2.2
4.814 go: downloading golang.org/x/sys v0.18.0
4.962 go: downloading golang.org/x/sync v0.6.0
5.033 go: downloading golang.org/x/term v0.18.0
5.052 go: downloading github.com/mattn/go-colorable v0.1.13
5.140 go: downloading github.com/mattn/go-isatty v0.0.20
5.213 go: downloading golang.org/x/text v0.14.0
5.768 go: downloading golang.org/x/mod v0.16.0
43.15 # golang.org/x/tools/internal/tokeninternal
43.15 pkg/mod/golang.org/x/tools@v0.19.0/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)
------
Dockerfile:213
--------------------
 212 |     ARG GOTESTSUM_VERSION=v1.12.0
 213 | >>> RUN --mount=type=cache,target=/root/.cache/go-build \
 214 | >>>     --mount=type=cache,target=/go/pkg/mod \
 215 | >>>         GOBIN=/build/ GO111MODULE=on go install "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \
 216 | >>>      && /build/gotestsum --version
 217 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c GOBIN=/build/ GO111MODULE=on go install \"gotest.tools/gotestsum@${GOTESTSUM_VERSION}\"      && /build/gotestsum --version" did not complete successfully: exit code: 1
Build references
Check build summary support
Error: buildx bake failed with: ERROR: failed to solve: process "/bin/sh -c GOBIN=/build/ GO111MODULE=on go install \"gotest.tools/gotestsum@${GOTESTSUM_VERSION}\"      && /build/gotestsum --version" did not complete successfully: exit code: 1

@thaJeztah
Copy link
Member Author

Yup; easy to reproduce;

docker run --rm golang:1.25rc1 sh -c 'go install gotest.tools/gotestsum@v1.12.0'
go: downloading gotest.tools/gotestsum v1.12.0
go: downloading github.com/dnephin/pflag v1.0.7
go: downloading github.com/fatih/color v1.16.0
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading golang.org/x/tools v0.19.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading golang.org/x/sys v0.18.0
go: downloading github.com/bitfield/gotestdox v0.2.2
go: downloading golang.org/x/sync v0.6.0
go: downloading golang.org/x/term v0.18.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading golang.org/x/text v0.14.0
go: downloading golang.org/x/mod v0.16.0
# golang.org/x/tools/internal/tokeninternal
pkg/mod/golang.org/x/tools@v0.19.0/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)

@thaJeztah
Copy link
Member Author

derp; BuildKit is using alpine 3.21;

Dockerfile:35
--------------------
  33 |     
  34 |     # golatest is alias for Go base image
  35 | >>> FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest
  36 |     
  37 |     # gobuild-base is base stage for compiling go/cgo
--------------------
ERROR: failed to solve: docker.io/library/golang:1.24.0-rc.1-alpine3.21: not found

@crazy-max
Copy link
Member

derp; BuildKit is using alpine 3.21;

Dockerfile:35
--------------------
  33 |     
  34 |     # golatest is alias for Go base image
  35 | >>> FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest
  36 |     
  37 |     # gobuild-base is base stage for compiling go/cgo
--------------------
ERROR: failed to solve: docker.io/library/golang:1.24.0-rc.1-alpine3.21: not found

You can set ALPINE_VERSION env in:

-
name: Build test image
uses: docker/bake-action@v6
with:
source: .
workdir: ./buildkit
targets: integration-tests
set: |
*.output=type=docker,name=${{ env.TEST_IMAGE_ID }}

      -
        name: Build test image
        uses: docker/bake-action@v6
        env:
          ALPINE_VERSION: 3.22
        with:
          source: .
          workdir: ./buildkit
          targets: integration-tests
          set: |
            *.output=type=docker,name=${{ env.TEST_IMAGE_ID }}

This will set the build-arg accordingly in the bake definition:

@thaJeztah
Copy link
Member Author

Oh! I added it at the top, and it looks like it picks it up, but the problem may not be the alpine version, but the "SemVer" format (again)?

ERROR: failed to solve: docker.io/library/golang:1.24.0-rc.1-alpine3.22: not found

Let me check if I can fix that. Really annoying! 😂

@thaJeztah thaJeztah force-pushed the update_go1.25 branch 2 times, most recently from daabc99 to 80fa16c Compare July 3, 2025 13:14
@thaJeztah
Copy link
Member Author

This one could be legit;

=== Failed
=== FAIL: amd64.integration-cli TestDockerDaemonSuite/TestHTTPSInfoRogueCert (0.73s)
    docker_cli_daemon_test.go:737: Expected err: bad certificate, got instead: exit status 1 and output: error during connect: Get https://localhost:4271/v1.38/info: remote error: tls: handshake failure
    --- FAIL: TestDockerDaemonSuite/TestHTTPSInfoRogueCert (0.73s)

@thaJeztah thaJeztah changed the title [DNM] update to go1.25rc1 [DNM] update to go1.25rc2 Jul 13, 2025
@thaJeztah thaJeztah changed the title [DNM] update to go1.25rc2 [DNM] update to go1.25rc3 Aug 8, 2025
@thaJeztah thaJeztah changed the title [DNM] update to go1.25rc3 [DNM] update to go1.25.1 Sep 16, 2025
@thaJeztah
Copy link
Member Author

thaJeztah commented Sep 17, 2025

Arf; looks like swagger is also impacted by that golang.org/x/tools bug;

 > [swagger 2/2] RUN --mount=type=cache,target=/root/.cache/go-build,id=swagger-build-linux/arm64     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/ <<EOT (set -e...):
11.29 go: downloading github.com/subosito/gotenv v1.6.0
11.29 go: downloading github.com/hashicorp/hcl v1.0.0
11.58 go: downloading gopkg.in/ini.v1 v1.67.0
11.58 go: downloading github.com/magiconair/properties v1.8.7
12.05 go: downloading github.com/pelletier/go-toml/v2 v2.1.1
12.05 go: downloading golang.org/x/text v0.15.0
12.72 go: downloading github.com/mitchellh/reflectwalk v1.0.2
13.29 go: downloading golang.org/x/mod v0.17.0
75.17 # golang.org/x/tools/internal/tokeninternal
75.17 /go/pkg/mod/golang.org/x/tools@v0.21.0/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)

PR pending, but misses a DCO sign-off;

@thaJeztah
Copy link
Member Author

Microsoft's registry having issues?

Step 1/15 : ARG WINDOWS_BASE_IMAGE=mcr.microsoft.com/windows/servercore
Step 2/15 : ARG WINDOWS_BASE_IMAGE_TAG=ltsc2022
Step 3/15 : FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG}
pull access denied for mcr.microsoft.com/windows/servercore, repository does not exist or may require 'docker login': denied: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta content='text/html; charset=utf-8' http-equiv='content-type'/><style type='text/css'>body { font-family:Arial; margin-left:40px; }img  { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p  { font-size: 13px; color: #000000; margin: 7px 0px 0px 0px }#errorref { font-size: 11px; color: #737373; margin-top: 41px }</style><title>Microsoft</title></head><body><div id='content'><div id='message'><h2>The request is blocked.</h2></div><div id='errorref'><span>Ref A: 7DFE9856FF314EF09A24DF3BE1499C1F Ref B: DM2AA1091214053 Ref C: 2025-09-17T11:23:25Z</span></div></div></body></html>
Error: Process completed with exit code 1.

"the request is blocked" 🤔

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah mentioned this pull request Oct 13, 2025
1 task
@thaJeztah thaJeztah marked this pull request as ready for review October 13, 2025 10:13
@thaJeztah thaJeztah requested a review from tianon as a code owner October 13, 2025 10:13
@vvoland vvoland merged commit e4ad61f into moby:master Oct 13, 2025
215 of 217 checks passed
@thaJeztah thaJeztah deleted the update_go1.25 branch October 13, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/builder/buildkit Build area/ci kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/windows status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update build pipeline to go 1.25

3 participants