From 0604bfec9488319cfd8a279147f76b9c2cb4c956 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Fri, 22 Sep 2023 23:41:53 +0000 Subject: [PATCH] update to go 1.21 Signed-off-by: Evan Baker --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- .github/workflows/crdgen.yaml | 2 +- .../workflows/cyclonus-netpol-extended-nightly-test.yaml | 2 +- .github/workflows/cyclonus-netpol-test.yaml | 2 +- .github/workflows/golangci.yaml | 2 +- azure-ipam/go.mod | 2 +- build/tools/go.mod | 2 +- cns/linux.Dockerfile | 2 +- cns/windows.Dockerfile | 2 +- dropgz/build/cniTest_linux.Dockerfile | 6 +++--- dropgz/build/cniTest_windows.Dockerfile | 4 ++-- dropgz/build/linux.Dockerfile | 2 +- dropgz/build/windows.Dockerfile | 2 +- dropgz/go.mod | 2 +- go.mod | 2 +- 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 | 2 +- 23 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e510e02ae3..c1267903a3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/go/.devcontainer/base.Dockerfile # [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster -ARG VARIANT="1.20" +ARG VARIANT="1.21" FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT} # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6e354dd318..bea01de95c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,7 @@ // Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local arm64/Apple Silicon. - "VARIANT": "1.20-bullseye", + "VARIANT": "1.21-bullseye", // Options "NODE_VERSION": "none" } diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index ab5bd33592..4833d43907 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -11,7 +11,7 @@ jobs: crdgen119: strategy: matrix: - go-version: ['1.20'] + go-version: ['1.21'] os: [ubuntu-latest] name: CRDs are Generated runs-on: ${{ matrix.os }} diff --git a/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml b/.github/workflows/cyclonus-netpol-extended-nightly-test.yaml index b5cf07df74..0fe111c57d 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@v4 with: - go-version: "^1.20" + go-version: "^1.21" - 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 89b0fb7222..8679b9deab 100644 --- a/.github/workflows/cyclonus-netpol-test.yaml +++ b/.github/workflows/cyclonus-netpol-test.yaml @@ -32,7 +32,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '^1.20' + go-version: '^1.21' - name: Setup Kind uses: engineerd/setup-kind@v0.5.0 diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index 9397f19329..59d04ba5fd 100644 --- a/.github/workflows/golangci.yaml +++ b/.github/workflows/golangci.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.20.x"] + go-version: ["1.21.x"] os: [ubuntu-latest, windows-latest] name: Lint runs-on: ${{ matrix.os }} diff --git a/azure-ipam/go.mod b/azure-ipam/go.mod index 126ea0917c..f61813c1f3 100644 --- a/azure-ipam/go.mod +++ b/azure-ipam/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/azure-ipam -go 1.20 +go 1.21 require ( github.com/Azure/azure-container-networking v1.5.12-0.20230919193705-477200881d37 diff --git a/build/tools/go.mod b/build/tools/go.mod index 63d76e2151..b28ac53318 100644 --- a/build/tools/go.mod +++ b/build/tools/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/build/tools -go 1.20 +go 1.21 require ( github.com/AlekSi/gocov-xml v1.1.0 diff --git a/cns/linux.Dockerfile b/cns/linux.Dockerfile index 88585339e5..6177bb58d0 100644 --- a/cns/linux.Dockerfile +++ b/cns/linux.Dockerfile @@ -1,7 +1,7 @@ FROM mcr.microsoft.com/cbl-mariner/base/core:1.0 AS certs RUN tdnf upgrade -y && tdnf install -y ca-certificates -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder ARG VERSION ARG CNS_AI_PATH ARG CNS_AI_ID diff --git a/cns/windows.Dockerfile b/cns/windows.Dockerfile index 4ca5e82c2e..52bec2e7b6 100644 --- a/cns/windows.Dockerfile +++ b/cns/windows.Dockerfile @@ -1,5 +1,5 @@ ARG OS_VERSION -FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS builder +FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder ARG VERSION ARG CNS_AI_PATH ARG CNS_AI_ID diff --git a/dropgz/build/cniTest_linux.Dockerfile b/dropgz/build/cniTest_linux.Dockerfile index b92b993c84..07955a46ea 100644 --- a/dropgz/build/cniTest_linux.Dockerfile +++ b/dropgz/build/cniTest_linux.Dockerfile @@ -1,10 +1,10 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS azure-ipam +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS azure-ipam ARG VERSION WORKDIR /azure-ipam COPY ./azure-ipam . RUN CGO_ENABLED=0 go build -a -o bin/azure-ipam -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" . -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS azure-vnet +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS azure-vnet ARG VERSION WORKDIR /azure-container-networking COPY . . @@ -28,7 +28,7 @@ COPY --from=azure-vnet /azure-container-networking/telemetry/azure-vnet-telemetr RUN cd pkg/embed/fs/ && sha256sum * > sum.txt RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS dropgz +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/dropgz/build/cniTest_windows.Dockerfile b/dropgz/build/cniTest_windows.Dockerfile index 874d46b95d..c869f07a7e 100644 --- a/dropgz/build/cniTest_windows.Dockerfile +++ b/dropgz/build/cniTest_windows.Dockerfile @@ -1,6 +1,6 @@ ARG ARCH ARG OS_VERSION -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS azure-vnet +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS azure-vnet ARG VERSION WORKDIR /azure-container-networking COPY . . @@ -19,7 +19,7 @@ COPY --from=azure-vnet /azure-container-networking/telemetry/azure-vnet-telemetr RUN cd pkg/embed/fs/ && sha256sum * > sum.txt RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS dropgz +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/dropgz/build/linux.Dockerfile b/dropgz/build/linux.Dockerfile index 2ce288dd54..cda117d305 100644 --- a/dropgz/build/linux.Dockerfile +++ b/dropgz/build/linux.Dockerfile @@ -36,7 +36,7 @@ COPY --from=azure-vnet /azure-container-networking/azure-vnet-ipam pkg/embed/fs RUN cd pkg/embed/fs/ && sha256sum * > sum.txt RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS dropgz +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/dropgz/build/windows.Dockerfile b/dropgz/build/windows.Dockerfile index 0499163eb7..841250f178 100644 --- a/dropgz/build/windows.Dockerfile +++ b/dropgz/build/windows.Dockerfile @@ -27,7 +27,7 @@ COPY --from=azure-vnet /azure-container-networking/azure-vnet-telemetry.config p RUN cd pkg/embed/fs/ && sha256sum * > sum.txt RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done -FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS dropgz +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/dropgz/go.mod b/dropgz/go.mod index 491eb44368..a454b7f554 100644 --- a/dropgz/go.mod +++ b/dropgz/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/dropgz -go 1.20 +go 1.21 require ( github.com/jsternberg/zap-logfmt v1.3.0 diff --git a/go.mod b/go.mod index 75274c3a75..53575cb3b1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking -go 1.20 +go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.3 diff --git a/hack/toolbox/Dockerfile.windows b/hack/toolbox/Dockerfile.windows index 7bc881cefa..12c4867157 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.20 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 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 ee9aea25d2..ea3e2e3a41 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.20 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 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 45b552be00..12bac27032 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.20 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build ADD ./server/server.go / WORKDIR / RUN CGO_ENABLED=0 GOOS=linux go build -o server . diff --git a/npm/linux.Dockerfile b/npm/linux.Dockerfile index 3bcd6132ff..6a3d4bd574 100644 --- a/npm/linux.Dockerfile +++ b/npm/linux.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/npm/windows.Dockerfile b/npm/windows.Dockerfile index b2c1cc2696..bd8c9c87a9 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.20 AS builder +FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/tools/acncli/Dockerfile b/tools/acncli/Dockerfile index 4b6dcee5a4..49d523609e 100644 --- a/tools/acncli/Dockerfile +++ b/tools/acncli/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 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 23ef782b86..728c8e77ee 100644 --- a/zapai/go.mod +++ b/zapai/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/zapai -go 1.20 +go 1.21 require ( github.com/jsternberg/zap-logfmt v1.3.0