From ddb0b8da9dbcd3d507001c5cf8a01708816f3cd5 Mon Sep 17 00:00:00 2001 From: cpanato Date: Fri, 9 Feb 2024 14:43:34 +0100 Subject: [PATCH 1/3] [go] Bump images, dependencies and versions to go 1.22 Signed-off-by: cpanato --- .go-version | 2 +- build/build-image/cross/VERSION | 2 +- build/common.sh | 4 ++-- build/dependencies.yaml | 26 ++++++++++++-------------- hack/lib/golang.sh | 3 +-- staging/publishing/rules.yaml | 2 +- test/images/Makefile | 2 +- 7 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.go-version b/.go-version index f8bb37dbb59..e342dea0de2 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.22rc2 \ No newline at end of file +1.22 \ No newline at end of file diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index c5d5845dabb..413df5dfd9c 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.30.0-go1.22rc2-bullseye.0 +v1.30.0-go1.22-bullseye.0 diff --git a/build/common.sh b/build/common.sh index c96555134b4..ff211f3af4e 100755 --- a/build/common.sh +++ b/build/common.sh @@ -96,8 +96,8 @@ readonly KUBE_RSYNC_PORT="${KUBE_RSYNC_PORT:-}" readonly KUBE_CONTAINER_RSYNC_PORT=8730 # These are the default versions (image tags) for their respective base images. -readonly __default_distroless_iptables_version=v0.5.0 -readonly __default_go_runner_version=v2.3.1-go1.22rc2-bookworm.0 +readonly __default_distroless_iptables_version=v0.5.1 +readonly __default_go_runner_version=v2.3.1-go1.22-bookworm.0 readonly __default_setcap_version=bookworm-v1.0.1 # These are the base images for the Docker-wrapped binaries. diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 3012995073e..115964647c7 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -118,13 +118,12 @@ dependencies: # Golang - name: "golang: upstream version" - version: 1.22rc2 + version: 1.22 refPaths: - path: .go-version - path: build/build-image/cross/VERSION - # TODO: remove this when whe have the go1.22 released and not the rc. - # - path: staging/publishing/rules.yaml - # match: 'default-go-version\: \d+.\d+(alpha|beta|rc)?\.?(\d+)?' + - path: staging/publishing/rules.yaml + match: 'default-go-version\: \d+.\d+(alpha|beta|rc)?\.?(\d+)?' - path: test/images/Makefile match: GOLANG_VERSION=\d+.\d+(alpha|beta|rc)?\.?\d+ @@ -133,16 +132,15 @@ dependencies: # # This entry is a stub of the major version to allow dependency checks to # pass when building Kubernetes using a pre-release of Golang. - # TODO: remove this when whe have the go1.22 released and not the rc. - # - name: "golang: 1." - # version: 1.22 - # refPaths: - # - path: build/build-image/cross/VERSION - # - path: hack/lib/golang.sh - # match: minimum_go_version=go([0-9]+\.[0-9]+) + - name: "golang: 1." + version: 1.22 + refPaths: + - path: build/build-image/cross/VERSION + - path: hack/lib/golang.sh + match: minimum_go_version=go([0-9]+\.[0-9]+) - name: "registry.k8s.io/kube-cross: dependents" - version: v1.30.0-go1.22rc2-bullseye.0 + version: v1.30.0-go1.22-bullseye.0 refPaths: - path: build/build-image/cross/VERSION @@ -180,7 +178,7 @@ dependencies: match: registry\.k8s\.io\/build-image\/debian-base:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - name: "registry.k8s.io/distroless-iptables: dependents" - version: v0.5.0 + version: v0.5.1 refPaths: - path: build/common.sh match: __default_distroless_iptables_version= @@ -188,7 +186,7 @@ dependencies: match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"} - name: "registry.k8s.io/go-runner: dependents" - version: v2.3.1-go1.22rc2-bookworm.0 + version: v2.3.1-go1.22-bookworm.0 refPaths: - path: build/common.sh match: __default_go_runner_version= diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index e8efc69907c..f5eed586065 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -497,8 +497,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)" local minimum_go_version - # TODO: Update to go1.22 as soon we are ready to merge this - minimum_go_version=go1.21 + minimum_go_version=go1.22 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then kube::log::usage_from_stdin < Date: Fri, 9 Feb 2024 14:47:56 +0100 Subject: [PATCH 2/3] use patch number Signed-off-by: cpanato --- .go-version | 2 +- staging/publishing/rules.yaml | 2 +- test/images/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.go-version b/.go-version index e342dea0de2..80a81c0e7fc 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.22 \ No newline at end of file +1.22.0 \ No newline at end of file diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml index ac960dab1e3..a3909ed86c2 100644 --- a/staging/publishing/rules.yaml +++ b/staging/publishing/rules.yaml @@ -2392,4 +2392,4 @@ rules: - staging/src/k8s.io/endpointslice recursive-delete-patterns: - '*/.gitattributes' -default-go-version: 1.22 +default-go-version: 1.22.0 diff --git a/test/images/Makefile b/test/images/Makefile index 3b57b0af2c2..3ed2e3d6cce 100644 --- a/test/images/Makefile +++ b/test/images/Makefile @@ -16,7 +16,7 @@ REGISTRY ?= registry.k8s.io/e2e-test-images GOARM ?= 7 DOCKER_CERT_BASE_PATH ?= QEMUVERSION=v5.1.0-2 -GOLANG_VERSION=1.22 +GOLANG_VERSION=1.22.0 export ifndef WHAT From 73cc31847fce71cd99eadfa21b505c8764a3eeff Mon Sep 17 00:00:00 2001 From: cpanato Date: Fri, 9 Feb 2024 15:01:16 +0100 Subject: [PATCH 3/3] fix Signed-off-by: cpanato --- test/utils/image/manifest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index 4fe64084569..f688fa40d62 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -237,7 +237,7 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config configs[BusyBox] = Config{list.PromoterE2eRegistry, "busybox", "1.36.1-1"} configs[CudaVectorAdd] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "1.0"} configs[CudaVectorAdd2] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "2.3"} - configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.5.0"} + configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.5.1"} configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.12-0"} configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-4"} configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"}