From 8138d4e71a6df8aa1e518d6992aa26c690df61d5 Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Tue, 9 Jul 2024 20:16:58 +0000 Subject: [PATCH] bump Go to 1.22 --- .github/workflows/cover.yaml | 2 +- .github/workflows/dependabot-code-gen.yml | 2 +- .github/workflows/scan.yml | 2 +- .golangci.yml | 6 +++--- Dockerfile | 2 +- Makefile | 4 ++-- Tiltfile | 2 +- config/aso/kustomization.yaml | 4 ++-- docs/book/src/developers/development.md | 2 +- hack/ensure-go.sh | 2 +- netlify.toml | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cover.yaml b/.github/workflows/cover.yaml index 134568bbd63..7390875141f 100644 --- a/.github/workflows/cover.yaml +++ b/.github/workflows/cover.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - run: "PATH=/usr/local/go/bin:$PATH make test-cover" - uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 env: diff --git a/.github/workflows/dependabot-code-gen.yml b/.github/workflows/dependabot-code-gen.yml index b7eb5988055..89a57a0f484 100644 --- a/.github/workflows/dependabot-code-gen.yml +++ b/.github/workflows/dependabot-code-gen.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' id: go - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index abfc2e03b7a..733d8db86be 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -22,6 +22,6 @@ jobs: - name: Setup go uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: 1.21 + go-version: 1.22 - name: Run verify container script run: make verify-container-images diff --git a/.golangci.yml b/.golangci.yml index b447bfd172a..cd75acf4d18 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -123,11 +123,11 @@ linters-settings: arguments: - disableStutteringCheck staticcheck: - go: "1.21" + go: "1.22" stylecheck: - go: "1.21" + go: "1.22" unused: - go: "1.21" + go: "1.22" issues: exclude-rules: diff --git a/Dockerfile b/Dockerfile index c8e507f4a9f..33029e4c82c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG ARCH # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder WORKDIR /workspace # Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy diff --git a/Makefile b/Makefile index d06ecf685e6..a470698ca0c 100644 --- a/Makefile +++ b/Makefile @@ -393,7 +393,7 @@ delete-workload-cluster: $(KUBECTL) ## Deletes the example workload Kubernetes c .PHONY: docker-pull-prerequisites docker-pull-prerequisites: ## Pull prerequisites for building controller-manager. docker pull docker/dockerfile:1.4 - docker pull docker.io/library/golang:1.21 + docker pull docker.io/library/golang:1.22 docker pull gcr.io/distroless/static:latest .PHONY: docker-build @@ -647,7 +647,7 @@ release-binary: $(RELEASE_DIR) ## Compile and build release binaries. -e GOARCH=$(GOARCH) \ -v "$$(pwd):/workspace" \ -w /workspace \ - golang:1.21 \ + golang:1.22 \ go build -a -ldflags '$(LDFLAGS) -extldflags "-static"' \ -o $(RELEASE_DIR)/$(notdir $(RELEASE_BINARY))-$(GOOS)-$(GOARCH) $(RELEASE_BINARY) diff --git a/Tiltfile b/Tiltfile index 55468a5fdf6..d6c4147f770 100644 --- a/Tiltfile +++ b/Tiltfile @@ -126,7 +126,7 @@ def validate_auth(): tilt_helper_dockerfile_header = """ # Tilt image -FROM golang:1.21 as tilt-helper +FROM golang:1.22 as tilt-helper # Support live reloading with Tilt RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \ wget --output-document /start.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh && \ diff --git a/config/aso/kustomization.yaml b/config/aso/kustomization.yaml index be9d2566a27..b358edddd7c 100644 --- a/config/aso/kustomization.yaml +++ b/config/aso/kustomization.yaml @@ -25,10 +25,10 @@ patches: name: azureserviceoperator-system - patch: |- - op: test - path: /spec/template/spec/containers/0/args/4 + path: /spec/template/spec/containers/0/args/6 value: --crd-pattern= - op: replace # Users can specify additional ASO CRDs. CRDs should be appended with ';' - path: /spec/template/spec/containers/0/args/4 + path: /spec/template/spec/containers/0/args/6 value: --crd-pattern=${ADDITIONAL_ASO_CRDS:= } target: group: apps diff --git a/docs/book/src/developers/development.md b/docs/book/src/developers/development.md index ab0ac95afb3..79efd00fe78 100644 --- a/docs/book/src/developers/development.md +++ b/docs/book/src/developers/development.md @@ -46,7 +46,7 @@ ### Base requirements 1. Install [go][go] - - Get the latest patch version for go v1.21. + - Get the latest patch version for go v1.22. 2. Install [jq][jq] - `brew install jq` on macOS. - `sudo apt install jq` on Windows + WSL2 diff --git a/hack/ensure-go.sh b/hack/ensure-go.sh index 539e6c5b99b..12d1854fe22 100755 --- a/hack/ensure-go.sh +++ b/hack/ensure-go.sh @@ -31,7 +31,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(go version)" local minimum_go_version - minimum_go_version=go1.21.9 + minimum_go_version=go1.22.5 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 cat <