Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0] update to go1.20.13#47054

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jan 10, 2024

update buildkit and set ALPINE_VERSION=3.18

full diff: moby/buildkit@d3e6c13...435cb77

The 0.11 branch of buildkit defaults to go1.19 (EOL), and
Alpine 3.17 (EOL).

We already set GO_VERSION to override the go version to
use go1.20, but the Dockerfile also has a ALPINE_VERSION
build-arg, so let's override that as well to prevent the
build from failing:

Dockerfile:39
--------------------
  37 |
  38 |     # go base image
  39 | >>> FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest
  40 |
  41 |     # git stage is used for checking out remote repository sources
--------------------
ERROR: failed to solve: golang:1.20.13-alpine3.17: docker.io/library/golang:1.20.13-alpine3.17: not found
Error: Process completed with exit code 1.

full diff: moby/buildkit@d3e6c13...435cb77

update to go1.20.13

go1.20.13 (released 2024-01-09) includes fixes to the runtime and the crypto/tls package. See the Go 1.20.13 milestone on our issue tracker for details:

- What I did

- How I did it

- How to verify it

- Description for the changelog

- Update Go runtime to [1.20.13](https://go.dev/doc/devel/release#go1.20.minor)

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

@thaJeztah
Copy link
Member Author

[internal] load metadata for docker.io/library/golang:1.20.13-alpine3.17:

Oh! It's failing because it's still using alpine 3.17, which is no longer published (EOL?)

@thaJeztah
Copy link
Member Author

thaJeztah commented Jan 10, 2024

Oh! Dang.... and that's in the BuildKit repository, not here 😞

Here we go again. Changing my middle-name to "Shaver of Yaks and opener of cans of worms"

@thaJeztah
Copy link
Member Author

Looks like the BuildKit 0.11 Dockerfile is still using go1.19 (which we override using GO_VERSION), but also has a ALPINE_VERSION build-arg; let's see if setting ALPINE_VERSION as environment variable will be picked up by it.

@thaJeztah
Copy link
Member Author

Ah, dang; still changes needed; looks like the script doesn't pass ALPINE_VERSION;

 BUILDX_NO_DEFAULT_LOAD=true
+ BUILDX_BUILDER=
+ docker buildx build --build-arg GO_VERSION --build-arg BUILDKITD_TAGS= --target integration-tests --output type=docker,name=buildkit-tests . --progress=plain
#0 building with "builder-de6b5a9f-f34d-4964-b2e3-c461e834b9b7" instance using docker-container driver

vendor.mod Outdated
@@ -56,7 +56,7 @@ require (
github.com/klauspost/compress v1.17.2
github.com/miekg/dns v1.1.43
github.com/mistifyio/go-zfs/v3 v3.0.1
github.com/moby/buildkit v0.11.7-0.20230908085316-d3e6c1360f6e // IMPORTANT: when updating, also update the version in builder/builder-next/worker/worker.go
github.com/moby/buildkit v0.11.7-0.20240110143849-d08077628de0 // IMPORTANT: when updating, also update the version in builder/builder-next/worker/worker.go
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the BuildKit version so that we can use ALPINE_VERSION in CI (GHA uses the same commit to test buildkit);

@thaJeztah
Copy link
Member Author

NOOOOOOO! Now we have ALPINE_VERSION working.. but next bit is failing;

 > [dnsname 3/3] RUN --mount=target=/root/.cache,type=cache   set -e; make binaries; mv bin/dnsname /usr/bin/dnsname:
0.512 GO111MODULE=on go build -mod=vendor -ldflags '-X main.gitCommit=18822f9a4fb35d1349eb256f4cd2bfd372474d84' -o bin/dnsname github.com/containers/dnsname/plugins/meta/dnsname
15.20 # runtime/cgo
15.20 In file included from _cgo_export.c:3:
15.20 /usr/include/fortify/stdlib.h:23:15: fatal error: stdlib.h: No such file or directory
15.20    23 | #include_next <stdlib.h>
15.20       |               ^~~~~~~~~~
15.20 compilation terminated.
37.52 make: *** [Makefile:42: binaries] Error 1

@thaJeztah
Copy link
Member Author

See the docker/cli repo where we had the same issue;

full diff: moby/buildkit@d3e6c13...435cb77

The 0.11 branch of buildkit defaults to go1.19 (EOL), and
Alpine 3.17 (EOL).

We already set GO_VERSION to override the go version to
use go1.20, but the Dockerfile also has a ALPINE_VERSION
build-arg, so let's override that as well to prevent the
build from failing:

    Dockerfile:39
    --------------------
      37 |
      38 |     # go base image
      39 | >>> FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest
      40 |
      41 |     # git stage is used for checking out remote repository sources
    --------------------
    ERROR: failed to solve: golang:1.20.13-alpine3.17: docker.io/library/golang:1.20.13-alpine3.17: not found
    Error: Process completed with exit code 1.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
go1.20.13 (released 2024-01-09) includes fixes to the runtime and the crypto/tls
package. See the Go 1.20.13 milestone on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.20.13+label%3ACherryPickApproved
- full diff: golang/go@go1.20.12...go1.20.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit 0bd850e into moby:24.0 Jan 24, 2024
102 checks passed
@thaJeztah thaJeztah deleted the 24.0_update_golang_1.20.13 branch January 24, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants