From 2a8e21c091c12f851ca0d6bf870e2ac35a67431d Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:53:48 +0000 Subject: [PATCH 1/6] update dockerfiles to use go v1.22 --- dropgz/build/linux.Dockerfile | 2 +- dropgz/build/windows.Dockerfile | 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 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dropgz/build/linux.Dockerfile b/dropgz/build/linux.Dockerfile index d090971698..79646fb7e3 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.21 AS dropgz +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/dropgz/build/windows.Dockerfile b/dropgz/build/windows.Dockerfile index dae5ee3840..5b7980091f 100644 --- a/dropgz/build/windows.Dockerfile +++ b/dropgz/build/windows.Dockerfile @@ -28,7 +28,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.21 AS dropgz +FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS dropgz ARG VERSION WORKDIR /dropgz COPY --from=compressor /dropgz . diff --git a/hack/toolbox/Dockerfile.windows b/hack/toolbox/Dockerfile.windows index 12c4867157..6e85d65108 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.21 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 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 fc0e7b160c..1e98bf2fbd 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.21 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 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 6c16f7459e..ba752e44d7 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.21 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build ADD ./server/server.go / ADD ./server/go.mod / WORKDIR / diff --git a/npm/linux.Dockerfile b/npm/linux.Dockerfile index ef03905016..7739f5d40e 100644 --- a/npm/linux.Dockerfile +++ b/npm/linux.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/npm/windows.Dockerfile b/npm/windows.Dockerfile index 06d4ff149e..9fce346eed 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.21 AS builder +FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder ARG VERSION ARG NPM_AI_PATH ARG NPM_AI_ID diff --git a/tools/acncli/Dockerfile b/tools/acncli/Dockerfile index 49d523609e..38f637b2ff 100644 --- a/tools/acncli/Dockerfile +++ b/tools/acncli/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build WORKDIR /go/src/github.com/Azure/azure-container-networking/ ARG VERSION ADD . . From 8b07ba948887b5cb6abfcfdceb0a47e714b350e7 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:23:27 +0000 Subject: [PATCH 2/6] more changes --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- .github/workflows/codeql.yaml | 2 +- .github/workflows/crdgen.yaml | 2 +- .github/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 +- dropgz/go.mod | 2 +- go.mod | 2 +- zapai/go.mod | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 513ad62979..51348983e0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -ARG VARIANT="1.21" +ARG VARIANT="1.22" 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 eee94e61c7..09f954b07e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "1.21-bullseye", + "VARIANT": "1.22-bullseye", "NODE_VERSION": "none" } }, diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 71ecbf5ff6..600db13ad8 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.21' + go-version: '1.22' check-latest: true - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index 781647c9c3..b6cec2c194 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -14,7 +14,7 @@ jobs: crdgen: strategy: matrix: - go-version: ['1.21'] + go-version: ['1.21', '1.22'] 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 1d86de9b88..bfb8449073 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.21" + go-version: "^1.22" - 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 9cb93876ef..8fb2a68659 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.21' + go-version: '^1.22' - name: Setup Kind uses: helm/kind-action@v1 diff --git a/.github/workflows/golangci.yaml b/.github/workflows/golangci.yaml index 0a85a34c6d..7c74a31c65 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'] + go-version: ['1.21.x', '1.22.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 90b8481c5d..3503ca03d6 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.21 +go 1.22 require ( github.com/Azure/azure-container-networking v1.5.21 diff --git a/build/tools/go.mod b/build/tools/go.mod index 6648c280b4..15f4ff91b0 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.21 +go 1.22 require ( github.com/AlekSi/gocov-xml v1.1.0 diff --git a/dropgz/go.mod b/dropgz/go.mod index a22b9c4c80..18e16d4c9e 100644 --- a/dropgz/go.mod +++ b/dropgz/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/dropgz -go 1.21 +go 1.22 require ( github.com/jsternberg/zap-logfmt v1.3.0 diff --git a/go.mod b/go.mod index 68cbd7ce20..fdcf5ce71a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking -go 1.21 +go 1.22 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 diff --git a/zapai/go.mod b/zapai/go.mod index 6c7738379b..00846a2f88 100644 --- a/zapai/go.mod +++ b/zapai/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/zapai -go 1.21 +go 1.22 require ( github.com/jsternberg/zap-logfmt v1.3.0 From 146bdd88d5bd2d7dd35b92577718927e5a9d710d Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:08:37 +0000 Subject: [PATCH 3/6] mod file update --- bpf-prog/ipv6-hp-bpf/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpf-prog/ipv6-hp-bpf/go.mod b/bpf-prog/ipv6-hp-bpf/go.mod index e6dd75a0d6..87f2c3051f 100644 --- a/bpf-prog/ipv6-hp-bpf/go.mod +++ b/bpf-prog/ipv6-hp-bpf/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/bpf-prog/ipv6-hp-bpf -go 1.21.6 +go 1.22 require ( github.com/cilium/ebpf v0.15.0 From ab4fb504265ee0d0e103be306ff85e72e6cdf510 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 22 Aug 2024 01:14:18 +0000 Subject: [PATCH 4/6] revert bpf-prog --- bpf-prog/ipv6-hp-bpf/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpf-prog/ipv6-hp-bpf/go.mod b/bpf-prog/ipv6-hp-bpf/go.mod index 87f2c3051f..e6dd75a0d6 100644 --- a/bpf-prog/ipv6-hp-bpf/go.mod +++ b/bpf-prog/ipv6-hp-bpf/go.mod @@ -1,6 +1,6 @@ module github.com/Azure/azure-container-networking/bpf-prog/ipv6-hp-bpf -go 1.22 +go 1.21.6 require ( github.com/cilium/ebpf v0.15.0 From a14d3122750c899a39836d1b8b2dfe60f44b1d8c Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:08:33 +0000 Subject: [PATCH 5/6] fix for e2e --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4de3cb05dd..e6da18e6dd 100644 --- a/Makefile +++ b/Makefile @@ -874,7 +874,7 @@ CNI_TYPE ?= cilium # COVER_FILTER omits folders with all files tagged with one of 'unit', '!ignore_uncovered', or '!ignore_autogenerated' test-all: ## run all unit tests. - @$(eval COVER_FILTER=`go list --tags ignore_uncovered,ignore_autogenerated $(COVER_PKG)/... | tr '\n' ','`) + @$(eval COVER_FILTER=`go list $(COVER_PKG)/... | tr '\n' ','`) @echo Test coverpkg: $(COVER_FILTER) go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -coverpkg=$(COVER_FILTER) -race -covermode atomic -coverprofile=coverage.out $(COVER_PKG)/... From d6603d7797675648e72f2a7393d55fa5f6940e31 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:12:31 +0000 Subject: [PATCH 6/6] remove/update comment --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index e6da18e6dd..ff4119a94c 100644 --- a/Makefile +++ b/Makefile @@ -872,7 +872,6 @@ RESTART_CASE ?= false # CNI type is a key to direct the types of state validation done on a cluster. CNI_TYPE ?= cilium -# COVER_FILTER omits folders with all files tagged with one of 'unit', '!ignore_uncovered', or '!ignore_autogenerated' test-all: ## run all unit tests. @$(eval COVER_FILTER=`go list $(COVER_PKG)/... | tr '\n' ','`) @echo Test coverpkg: $(COVER_FILTER)