From 7c0a577e03d055c1277debf6c7e9f125b5a6645c Mon Sep 17 00:00:00 2001 From: Akash Singhal Date: Mon, 1 Jul 2024 17:17:14 -0700 Subject: [PATCH] chore: upgrade to go 1.22 (#1605) --- .devcontainer/Dockerfile | 4 ++-- .devcontainer/devcontainer.json | 4 ++-- .github/dependabot.yml | 4 ++-- .github/workflows/build-pr.yml | 4 ++-- .github/workflows/codeql.yml | 2 +- .github/workflows/e2e-aks.yml | 4 ++-- .github/workflows/e2e-cli.yml | 4 ++-- .github/workflows/e2e-k8s.yml | 4 ++-- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/high-availability.yml | 4 ++-- .github/workflows/quick-start.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/run-full-validation.yml | 4 ++-- go.mod | 2 +- httpserver/Dockerfile | 2 +- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1759d604cb..4fdd83470e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,8 +13,8 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/go/.devcontainer/base.Dockerfile -# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1.21-bullseye, 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster -FROM mcr.microsoft.com/vscode/devcontainers/go:1.21-bullseye@sha256:0ea3913135923a684b37f9e75a1e9adbb14551199244656b77f516c4c0c6d5bc +# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1.22-bullseye, 1.21-bullseye, 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster +FROM mcr.microsoft.com/vscode/devcontainers/go:1.22-bullseye@sha256:a80cd1df0fed16f2a6f6854b87df49940100449aa193fb55dc30acfdc7fd7309 # [Choice] Node.js version: none, lts/*, 18, 16, 14 ARG NODE_VERSION="none" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8c6506b9b8..54a00f2a83 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,10 +5,10 @@ "build": { "dockerfile": "Dockerfile", "args": { - // Update the VARIANT arg to pick a version of Go: 1.21, 1.20, 1.19, 1.18 + // Update the VARIANT arg to pick a version of Go: 1.22, 1.21, 1.20, 1.19, 1.18 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local arm64/Apple Silicon. - "VARIANT": "1.21-bullseye", + "VARIANT": "1.22-bullseye", // Options "NODE_VERSION": "none", // Ratify-specific devcontainer options diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f686e531b4..150fffaeeb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -33,7 +33,7 @@ updates: interval: "weekly" ignore: - dependency-name: "golang" - versions: '> 1.21' + versions: '> 1.22' commit-message: prefix: "chore" @@ -43,6 +43,6 @@ updates: interval: "weekly" ignore: - dependency-name: "vscode/devcontainers/go" - versions: '> 1.21' + versions: '> 1.22' commit-message: prefix: "chore" diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 131743efcf..421eaaac4e 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -78,10 +78,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Az CLI login uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16662dcd15..d564f275ce 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -36,7 +36,7 @@ jobs: - name: setup go environment uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: "1.21" + go-version: "1.22" - name: Initialize CodeQL uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # tag=v3.25.11 with: diff --git a/.github/workflows/e2e-aks.yml b/.github/workflows/e2e-aks.yml index d11028b421..566fda038f 100644 --- a/.github/workflows/e2e-aks.yml +++ b/.github/workflows/e2e-aks.yml @@ -39,10 +39,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Az CLI login uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1 with: diff --git a/.github/workflows/e2e-cli.yml b/.github/workflows/e2e-cli.yml index 1ae9fd279d..e4647246a4 100644 --- a/.github/workflows/e2e-cli.yml +++ b/.github/workflows/e2e-cli.yml @@ -41,7 +41,7 @@ jobs: - name: setup go environment uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: "1.21" + go-version: "1.22" - name: Run tidy run: go mod tidy - name: Build CLI @@ -70,7 +70,7 @@ jobs: - name: setup go environment uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: "1.21" + go-version: "1.22" - name: Run tidy run: go mod tidy - name: Build CLI diff --git a/.github/workflows/e2e-k8s.yml b/.github/workflows/e2e-k8s.yml index 31fb49a7a7..32ccffc6e0 100644 --- a/.github/workflows/e2e-k8s.yml +++ b/.github/workflows/e2e-k8s.yml @@ -32,10 +32,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Bootstrap e2e run: | diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index a27d793ffc..ca99ef74b6 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: golangci-lint uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 diff --git a/.github/workflows/high-availability.yml b/.github/workflows/high-availability.yml index a61da89824..d22afea6c6 100644 --- a/.github/workflows/high-availability.yml +++ b/.github/workflows/high-availability.yml @@ -36,10 +36,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Bootstrap e2e run: | diff --git a/.github/workflows/quick-start.yml b/.github/workflows/quick-start.yml index 4d6ba4ca66..634f819421 100644 --- a/.github/workflows/quick-start.yml +++ b/.github/workflows/quick-start.yml @@ -39,7 +39,7 @@ jobs: - name: setup go environment uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: "1.21" + go-version: "1.22" - name: Run tidy run: go mod tidy - name: Bootstrap e2e diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2529274290..ef307a5c8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Goreleaser uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 diff --git a/.github/workflows/run-full-validation.yml b/.github/workflows/run-full-validation.yml index 1361c97b9c..feee90e6bc 100644 --- a/.github/workflows/run-full-validation.yml +++ b/.github/workflows/run-full-validation.yml @@ -66,10 +66,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Set up Go 1.21 + - name: Set up Go 1.22 uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: '1.21' + go-version: '1.22' - name: Az CLI login uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1 diff --git a/go.mod b/go.mod index 27d584b35b..1827a9f8bf 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ratify-project/ratify -go 1.21 +go 1.22 // Accidentally published prior to 1.0.0 release retract ( diff --git a/httpserver/Dockerfile b/httpserver/Dockerfile index 0d04f237bf..a2cd4367e2 100644 --- a/httpserver/Dockerfile +++ b/httpserver/Dockerfile @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=$BUILDPLATFORM golang:1.21@sha256:b405b620c7b53ef64695c7da7c8396f411f381c1eb7da6713c585dd7eca1559b as builder +FROM --platform=$BUILDPLATFORM golang:1.22@sha256:a66eda637829ce891e9cf61ff1ee0edf544e1f6c5b0e666c7310dce231a66f28 as builder ARG TARGETPLATFORM ARG TARGETOS