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

update to go 1.21 #2243

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crdgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion azure-ipam/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/tools/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cns/linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cns/windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions dropgz/build/cniTest_linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
Expand All @@ -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 .
Expand Down
4 changes: 2 additions & 2 deletions dropgz/build/cniTest_windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
Expand All @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion dropgz/build/linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion dropgz/build/windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion dropgz/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/server/Dockerfile.heavy
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/server/Dockerfile.lite
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion npm/linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion npm/windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/acncli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
Expand Down
2 changes: 1 addition & 1 deletion zapai/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading