From dbdb22d9015e9f6b7ef2348c944f434488b145c4 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Wed, 9 Oct 2024 19:09:07 -0500 Subject: [PATCH] chore: upgrade go toolchain to 1.23 (#3022) * chore: update to go1.23 Signed-off-by: Evan Baker * set bpf-prog back to debian base image Signed-off-by: Evan Baker --------- Signed-off-by: Evan Baker --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- .github/workflows/codeql.yaml | 2 +- .github/workflows/crdgen.yaml | 6 +++++- .../workflows/cyclonus-netpol-extended-nightly-test.yaml | 2 +- .github/workflows/cyclonus-netpol-test.yaml | 2 +- .github/workflows/golangci.yaml | 4 ++-- azure-ipam/Dockerfile | 4 ++-- azure-ipam/go.mod | 4 +++- bpf-prog/ipv6-hp-bpf/go.mod | 4 +++- bpf-prog/ipv6-hp-bpf/linux.Dockerfile | 3 ++- build/tools/go.mod | 4 +++- cni/Dockerfile | 4 ++-- cns/Dockerfile | 4 ++-- dropgz/go.mod | 4 +++- go.mod | 4 ++-- hack/toolbox/Dockerfile.windows | 2 +- hack/toolbox/server/Dockerfile.heavy | 2 +- hack/toolbox/server/Dockerfile.lite | 2 +- npm/linux.Dockerfile | 2 +- npm/windows.Dockerfile | 2 +- tools/acncli/Dockerfile | 2 +- zapai/go.mod | 4 +++- 23 files changed, 43 insertions(+), 28 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 51348983e..3fa8fe02c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -ARG VARIANT="1.22" +ARG VARIANT="1.23" FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT} RUN apt-get update && \ export DEBIAN_FRONTEND=noninteractive && \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 09f954b07..3c09e93b4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "1.22-bullseye", + "VARIANT": "1.23-bullseye", "NODE_VERSION": "none" } }, diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index af5a71a90..0137fe75d 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -35,7 +35,7 @@ jobs: - name: Setup go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" check-latest: true - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index b6cec2c19..3686cf8c7 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -14,7 +14,7 @@ jobs: crdgen: strategy: matrix: - go-version: ['1.21', '1.22'] + go-version: ['1.22', '1.23'] os: [ubuntu-latest] name: CRDs are Generated runs-on: ${{ matrix.os }} @@ -31,5 +31,9 @@ jobs: run: make -C crd/multitenantnetworkcontainer - name: Regenerate Multitenancy CRDs run: make -C crd/multitenancy + - name: Regenerate ClusterSubnetState CRD + run: make -C crd/clustersubnetstate + - name: Regenerate OverlayExtensionConfig CRD + run: make -C crd/overlayextensionconfig - name: Fail if the tree is dirty run: test -z "$(git status --porcelain)" diff --git a/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml b/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml index bfb844907..16679a0b3 100644 --- a/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml +++ b/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "^1.22" + go-version: "^1.23" - name: Setup Kind uses: engineerd/setup-kind@v0.5.0 diff --git a/.github/workflows/cyclonus-netpol-test.yaml b/.github/workflows/cyclonus-netpol-test.yaml index 8fb2a6865..14811d4fa 100644 --- a/.github/workflows/cyclonus-netpol-test.yaml +++ b/.github/workflows/cyclonus-netpol-test.yaml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: '^1.22' + go-version: '^1.23' - name: Setup Kind uses: helm/kind-action@v1 diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index 7c74a31c6..186b1ae9e 100644 --- a/.github/workflows/golangci.yaml +++ b/.github/workflows/golangci.yaml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: ['1.21.x', '1.22.x'] + go-version: ['1.22.x', '1.23.x'] os: [ubuntu-latest, windows-latest] name: Lint runs-on: ${{ matrix.os }} @@ -29,5 +29,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.55 + version: v1.61 args: --new-from-rev=origin/master --config=.golangci.yml --timeout=25m diff --git a/azure-ipam/Dockerfile b/azure-ipam/Dockerfile index a6e53cc7c..14cbc3481 100644 --- a/azure-ipam/Dockerfile +++ b/azure-ipam/Dockerfile @@ -3,8 +3,8 @@ ARG DROPGZ_VERSION=v0.0.12 ARG OS_VERSION ARG OS -# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.22-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:c062e5e23f2d172a8fd590adcd171499af7005cae344a36284255f26e5ce4f8a AS go +# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.23.2-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:f8613198423d5cb702961f1547f9cb061f8da1c6ca9ce8da4824eb47db663cd7 AS go # skopeo inspect docker://mcr.microsoft.com/cbl-mariner/base/core:2.0 --format "{{.Name}}@{{.Digest}}" FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/base/core@sha256:a490e0b0869dc570ae29782c2bc17643aaaad1be102aca83ce0b96e0d0d2d328 AS mariner-core diff --git a/azure-ipam/go.mod b/azure-ipam/go.mod index 3503ca03d..8bcb9c308 100644 --- a/azure-ipam/go.mod +++ b/azure-ipam/go.mod @@ -1,6 +1,8 @@ module github.com/Azure/azure-container-networking/azure-ipam -go 1.22 +go 1.23 + +toolchain go1.23.2 require ( github.com/Azure/azure-container-networking v1.5.21 diff --git a/bpf-prog/ipv6-hp-bpf/go.mod b/bpf-prog/ipv6-hp-bpf/go.mod index e6dd75a0d..4de0b87fa 100644 --- a/bpf-prog/ipv6-hp-bpf/go.mod +++ b/bpf-prog/ipv6-hp-bpf/go.mod @@ -1,6 +1,8 @@ module github.com/Azure/azure-container-networking/bpf-prog/ipv6-hp-bpf -go 1.21.6 +go 1.23 + +toolchain go1.23.2 require ( github.com/cilium/ebpf v0.15.0 diff --git a/bpf-prog/ipv6-hp-bpf/linux.Dockerfile b/bpf-prog/ipv6-hp-bpf/linux.Dockerfile index 1b3ddfa86..12fe515dc 100644 --- a/bpf-prog/ipv6-hp-bpf/linux.Dockerfile +++ b/bpf-prog/ipv6-hp-bpf/linux.Dockerfile @@ -1,4 +1,5 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder +# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.23.2 --format "{{.Name}}@{{.Digest}}" +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:86c5b00bbed2a6e7157052d78bf4b45c0bf26545ed6e8fd7dbad51ac9415f534 AS builder ARG VERSION ARG DEBUG ARG OS diff --git a/build/tools/go.mod b/build/tools/go.mod index e5b66c9b9..e99b65477 100644 --- a/build/tools/go.mod +++ b/build/tools/go.mod @@ -1,6 +1,8 @@ module github.com/Azure/azure-container-networking/build/tools -go 1.22 +go 1.23 + +toolchain go1.23.2 require ( github.com/AlekSi/gocov-xml v1.1.0 diff --git a/cni/Dockerfile b/cni/Dockerfile index 97cbdc77e..097c07900 100644 --- a/cni/Dockerfile +++ b/cni/Dockerfile @@ -3,8 +3,8 @@ ARG DROPGZ_VERSION=v0.0.12 ARG OS_VERSION ARG OS -# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.22-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:c062e5e23f2d172a8fd590adcd171499af7005cae344a36284255f26e5ce4f8a AS go +# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.23.2-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:f8613198423d5cb702961f1547f9cb061f8da1c6ca9ce8da4824eb47db663cd7 AS go # skopeo inspect docker://mcr.microsoft.com/cbl-mariner/base/core:2.0 --format "{{.Name}}@{{.Digest}}" FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/base/core@sha256:a490e0b0869dc570ae29782c2bc17643aaaad1be102aca83ce0b96e0d0d2d328 AS mariner-core diff --git a/cns/Dockerfile b/cns/Dockerfile index 90330bec2..faaf06800 100644 --- a/cns/Dockerfile +++ b/cns/Dockerfile @@ -2,8 +2,8 @@ ARG ARCH ARG OS_VERSION ARG OS -# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.22-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:c062e5e23f2d172a8fd590adcd171499af7005cae344a36284255f26e5ce4f8a AS go +# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.23.2-cbl-mariner2.0 --format "{{.Name}}@{{.Digest}}" +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang@sha256:f8613198423d5cb702961f1547f9cb061f8da1c6ca9ce8da4824eb47db663cd7 AS go # skopeo inspect docker://mcr.microsoft.com/cbl-mariner/base/core:2.0 --format "{{.Name}}@{{.Digest}}" FROM mcr.microsoft.com/cbl-mariner/base/core@sha256:a490e0b0869dc570ae29782c2bc17643aaaad1be102aca83ce0b96e0d0d2d328 AS mariner-core diff --git a/dropgz/go.mod b/dropgz/go.mod index 18e16d4c9..902ea333c 100644 --- a/dropgz/go.mod +++ b/dropgz/go.mod @@ -1,6 +1,8 @@ module github.com/Azure/azure-container-networking/dropgz -go 1.22 +go 1.23 + +toolchain go1.23.2 require ( github.com/jsternberg/zap-logfmt v1.3.0 diff --git a/go.mod b/go.mod index c33a3683c..03c938d1d 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/Azure/azure-container-networking -go 1.22.0 +go 1.23 -toolchain go1.22.7 +toolchain go1.23.2 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 diff --git a/hack/toolbox/Dockerfile.windows b/hack/toolbox/Dockerfile.windows index 6e85d6510..5350fd151 100644 --- a/hack/toolbox/Dockerfile.windows +++ b/hack/toolbox/Dockerfile.windows @@ -1,5 +1,5 @@ # Build cns -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 AS builder # Build args ARG VERSION ARG CNS_AI_PATH diff --git a/hack/toolbox/server/Dockerfile.heavy b/hack/toolbox/server/Dockerfile.heavy index 1e98bf2fb..2366cc91b 100644 --- a/hack/toolbox/server/Dockerfile.heavy +++ b/hack/toolbox/server/Dockerfile.heavy @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 as build ADD ./ / WORKDIR / RUN CGO_ENABLED=0 GOOS=linux go build -o server . diff --git a/hack/toolbox/server/Dockerfile.lite b/hack/toolbox/server/Dockerfile.lite index ba752e44d..7ff67d2d2 100644 --- a/hack/toolbox/server/Dockerfile.lite +++ b/hack/toolbox/server/Dockerfile.lite @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 as build ADD ./server/server.go / ADD ./server/go.mod / WORKDIR / diff --git a/npm/linux.Dockerfile b/npm/linux.Dockerfile index 7739f5d40..3c278d246 100644 --- a/npm/linux.Dockerfile +++ b/npm/linux.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/npm/windows.Dockerfile b/npm/windows.Dockerfile index 9fce346ee..54e2b3d6d 100644 --- a/npm/windows.Dockerfile +++ b/npm/windows.Dockerfile @@ -1,5 +1,5 @@ ARG OS_VERSION -FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder +FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.23 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/tools/acncli/Dockerfile b/tools/acncli/Dockerfile index 38f637b2f..302f5d5e3 100644 --- a/tools/acncli/Dockerfile +++ b/tools/acncli/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 as build WORKDIR /go/src/github.com/Azure/azure-container-networking/ ARG VERSION ADD . . diff --git a/zapai/go.mod b/zapai/go.mod index 00846a2f8..60dd9648e 100644 --- a/zapai/go.mod +++ b/zapai/go.mod @@ -1,6 +1,8 @@ module github.com/Azure/azure-container-networking/zapai -go 1.22 +go 1.23 + +toolchain go1.23.2 require ( github.com/jsternberg/zap-logfmt v1.3.0