Skip to content

Commit 8d2b32c

Browse files
agaudreaultmeeech
authored andcommitted
chore(deps): bump go version to 1.22 (argoproj#3516)
* bump go version to 1.22 Signed-off-by: Alexandre Gaudreault <[email protected]> * fix deps version Signed-off-by: Alexandre Gaudreault <[email protected]> * codegen without manifest Signed-off-by: Alexandre Gaudreault <[email protected]> * manifest codegen Signed-off-by: Alexandre Gaudreault <[email protected]> * updates for CI Signed-off-by: Alexandre Gaudreault <[email protected]> * ignore mocks for codecov Signed-off-by: Alexandre Gaudreault <[email protected]> --------- Signed-off-by: Alexandre Gaudreault <[email protected]>
1 parent f9e8849 commit 8d2b32c

25 files changed

+194
-116
lines changed

.codecov.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ coverage:
88
default:
99
threshold: 0.1
1010
ignore:
11-
- "pkg/apis/rollouts/v1alpha1"
12-
- "test"
13-
- "**/*.pb.go"
14-
- "**/*.pb.gw.go"
15-
- "**/*generated.go"
16-
- "**/*generated.deepcopy.go"
17-
- "**/*_test.go"
18-
- "pkg/apis/client/.*"
19-
- "pkg/client/.*"
20-
- "vendor/.*"
11+
- 'pkg/apis/rollouts/v1alpha1'
12+
- 'test'
13+
- '**/*.pb.go'
14+
- '**/*.pb.gw.go'
15+
- '**/*generated.go'
16+
- '**/*generated.deepcopy.go'
17+
- '**/*_test.go'
18+
- 'pkg/apis/client/.*'
19+
- 'pkg/client/.*'
20+
- 'vendor/.*'
21+
- '**/mocks/*'

.github/workflows/docker-publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ jobs:
6161
needs: [set-vars]
6262
permissions:
6363
contents: read
64-
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
64+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
6565
id-token: write # for creating OIDC tokens for signing.
6666
uses: ./.github/workflows/image-reuse.yaml
6767
with:
6868
quay_image_name: ${{ needs.set-vars.outputs.controller-meta-tags }}
6969
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
70-
go-version: '1.21'
70+
go-version: '1.22'
7171
platforms: ${{ needs.set-vars.outputs.platforms }}
7272
push: ${{ github.event_name != 'pull_request' }}
7373
secrets:
@@ -78,13 +78,13 @@ jobs:
7878
needs: [set-vars]
7979
permissions:
8080
contents: read
81-
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
81+
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
8282
id-token: write # for creating OIDC tokens for signing.
8383
uses: ./.github/workflows/image-reuse.yaml
8484
with:
8585
quay_image_name: ${{ needs.set-vars.outputs.plugin-meta-tags }}
8686
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
87-
go-version: '1.21'
87+
go-version: '1.22'
8888
platforms: ${{ needs.set-vars.outputs.platforms }}
8989
push: ${{ github.event_name != 'pull_request' }}
9090
target: kubectl-argo-rollouts

.github/workflows/e2e.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ permissions:
2525

2626
jobs:
2727
event_file:
28-
name: "Event File"
28+
name: 'Event File'
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Upload
@@ -48,7 +48,7 @@ jobs:
4848
- name: Set up Go
4949
uses: actions/[email protected]
5050
with:
51-
go-version: '1.21'
51+
go-version: '1.22'
5252
- uses: actions/checkout@v4
5353
- name: Setup k3s
5454
env:

.github/workflows/gh-pages.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515
jobs:
1616
deploy:
1717
permissions:
18-
contents: write # for peaceiris/actions-gh-pages to push pages branch
18+
contents: write # for peaceiris/actions-gh-pages to push pages branch
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go
2727
uses: actions/[email protected]
2828
with:
29-
go-version: '1.21'
29+
go-version: '1.22'
3030
- name: build
3131
run: |
3232
pip install mkdocs mkdocs_material

.github/workflows/go.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Go
22
on:
33
push:
44
branches:
5-
- "master"
6-
- "release-*"
5+
- 'master'
6+
- 'release-*'
77
pull_request:
88
branches:
9-
- "master"
9+
- 'master'
1010
env:
1111
# Golang version to use across CI steps
12-
GOLANG_VERSION: '1.21'
12+
GOLANG_VERSION: '1.22'
1313

1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
@@ -20,7 +20,7 @@ permissions:
2020

2121
jobs:
2222
event_file:
23-
name: "Event File"
23+
name: 'Event File'
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Upload
@@ -30,8 +30,8 @@ jobs:
3030
path: ${{ github.event_path }}
3131
lint-go:
3232
permissions:
33-
contents: read # for actions/checkout to fetch code
34-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
33+
contents: read # for actions/checkout to fetch code
34+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
3535
name: Lint Go code
3636
runs-on: ubuntu-latest
3737
steps:

.github/workflows/release.yaml

+35-37
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
permissions: {}
88

99
env:
10-
GOLANG_VERSION: '1.21' # Note: go-version must also be set in job controller-image.with.go-version & plugin-image.with.go-version.
10+
GOLANG_VERSION: '1.22' # Note: go-version must also be set in job controller-image.with.go-version & plugin-image.with.go-version.
1111

1212
jobs:
1313
controller-image:
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
quay_image_name: quay.io/argoproj/argo-rollouts:${{ github.ref_name }}
2121
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
22-
go-version: '1.21'
22+
go-version: '1.22'
2323
platforms: linux/amd64,linux/arm64
2424
push: true
2525
secrets:
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
quay_image_name: quay.io/argoproj/kubectl-argo-rollouts:${{ github.ref_name }}
3737
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
38-
go-version: '1.21'
38+
go-version: '1.22'
3939
platforms: linux/amd64,linux/arm64
4040
push: true
4141
target: kubectl-argo-rollouts
@@ -44,41 +44,40 @@ jobs:
4444
quay_password: ${{ secrets.QUAY_ROBOT_TOKEN }}
4545

4646
controller-image-provenance:
47-
needs:
48-
- controller-image
49-
permissions:
50-
actions: read # for detecting the Github Actions environment.
51-
id-token: write # for creating OIDC tokens for signing.
52-
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
53-
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
54-
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
55-
with:
56-
image: quay.io/argoproj/argo-rollouts
57-
digest: ${{ needs.controller-image.outputs.image-digest }}
58-
secrets:
59-
registry-username: ${{ secrets.QUAY_USERNAME }}
60-
registry-password: ${{ secrets.QUAY_ROBOT_TOKEN }}
47+
needs:
48+
- controller-image
49+
permissions:
50+
actions: read # for detecting the Github Actions environment.
51+
id-token: write # for creating OIDC tokens for signing.
52+
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
53+
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
54+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
55+
with:
56+
image: quay.io/argoproj/argo-rollouts
57+
digest: ${{ needs.controller-image.outputs.image-digest }}
58+
secrets:
59+
registry-username: ${{ secrets.QUAY_USERNAME }}
60+
registry-password: ${{ secrets.QUAY_ROBOT_TOKEN }}
6161

6262
plugin-image-provenance:
63-
needs:
64-
- plugin-image
65-
permissions:
66-
actions: read # for detecting the Github Actions environment.
67-
id-token: write # for creating OIDC tokens for signing.
68-
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
69-
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
70-
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
71-
with:
72-
image: quay.io/argoproj/kubectl-argo-rollouts
73-
digest: ${{ needs.plugin-image.outputs.image-digest }}
74-
secrets:
75-
registry-username: ${{ secrets.QUAY_USERNAME }}
76-
registry-password: ${{ secrets.QUAY_ROBOT_TOKEN }}
77-
63+
needs:
64+
- plugin-image
65+
permissions:
66+
actions: read # for detecting the Github Actions environment.
67+
id-token: write # for creating OIDC tokens for signing.
68+
packages: write # for uploading attestations. (https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#known-issues)
69+
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
70+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
71+
with:
72+
image: quay.io/argoproj/kubectl-argo-rollouts
73+
digest: ${{ needs.plugin-image.outputs.image-digest }}
74+
secrets:
75+
registry-username: ${{ secrets.QUAY_USERNAME }}
76+
registry-password: ${{ secrets.QUAY_ROBOT_TOKEN }}
7877

7978
release-artifacts:
8079
permissions:
81-
contents: write # for softprops/action-gh-release to create GitHub release
80+
contents: write # for softprops/action-gh-release to create GitHub release
8281
runs-on: ubuntu-latest
8382
outputs:
8483
hashes: ${{ steps.hash.outputs.hashes }}
@@ -132,7 +131,6 @@ jobs:
132131
run: |
133132
echo "hashes=$(sha256sum ./dist/kubectl-argo-rollouts-* ./manifests/*.yaml | base64 -w0)" >> "$GITHUB_OUTPUT"
134133
135-
136134
release-artifacts-provenance:
137135
needs:
138136
- release-artifacts
@@ -143,8 +141,8 @@ jobs:
143141
# Must be refernced by a tag. https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/container/README.md#referencing-the-slsa-generator
144142
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
145143
with:
146-
base64-subjects: "${{ needs.release-artifacts.outputs.hashes }}"
147-
provenance-name: "argo-rollouts.intoto.jsonl"
144+
base64-subjects: '${{ needs.release-artifacts.outputs.hashes }}'
145+
provenance-name: 'argo-rollouts.intoto.jsonl'
148146
upload-assets: true
149147
draft-release: true
150148

@@ -183,7 +181,7 @@ jobs:
183181
SIGS_BOM_VERSION: v0.2.1
184182
# comma delimited list of project relative folders to inspect for package
185183
# managers (gomod, yarn, npm).
186-
PROJECT_FOLDERS: ".,./ui"
184+
PROJECT_FOLDERS: '.,./ui'
187185
# full qualified name of the container image to be inspected
188186
CONTAINER_IMAGE: quay.io/argoproj/argo-rollouts:${{ github.event.inputs.tag }}
189187

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
44
# Also used as the image in CI jobs so needs all dependencies
55
####################################################################################################
6-
FROM --platform=$BUILDPLATFORM golang:1.21 as builder
6+
FROM --platform=$BUILDPLATFORM golang:1.22 as builder
77

88
RUN apt-get update && apt-get install -y \
99
wget \
@@ -40,7 +40,7 @@ RUN NODE_ENV='production' yarn build
4040
####################################################################################################
4141
# Rollout Controller Build stage which performs the actual build of argo-rollouts binaries
4242
####################################################################################################
43-
FROM --platform=$BUILDPLATFORM golang:1.21 as argo-rollouts-build
43+
FROM --platform=$BUILDPLATFORM golang:1.22 as argo-rollouts-build
4444

4545
WORKDIR /go/src/github.com/argoproj/argo-rollouts
4646

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ E2E_PARALLEL ?= 1
2525
E2E_WAIT_TIMEOUT ?= 120
2626
GOPATH ?= $(shell go env GOPATH)
2727

28+
# Global toolchain configuration
29+
NODE_OPTIONS=""
30+
2831
override LDFLAGS += \
2932
-X ${PACKAGE}/utils/version.version=${VERSION} \
3033
-X ${PACKAGE}/utils/version.buildDate=${BUILD_DATE} \

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/argoproj/argo-rollouts
22

3-
go 1.21
3+
go 1.22
44

5-
toolchain go1.21.8
5+
toolchain go1.22.2
66

77
require (
88
github.com/antonmedv/expr v1.15.5

hack/installers/install-codegen-go-tools.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ go_mod_install k8s.io/code-generator/cmd/lister-gen
4545
go_mod_install k8s.io/kube-openapi/cmd/openapi-gen
4646

4747
# controller-gen is run by ./hack/gen-crd-spec to generate the CRDs
48-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0
48+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
4949

5050
# swagger cli is used to generate swagger docs
5151
go install github.com/go-swagger/go-swagger/cmd/[email protected]
5252

5353
# goimports is used to auto-format generated code
54-
go install golang.org/x/tools/cmd/goimports@v0.11.0
54+
go install golang.org/x/tools/cmd/goimports@v0.20.0
5555

5656
# mockery is used for generating mock
57-
go install github.com/vektra/mockery/v2@v2.32.0
57+
go install github.com/vektra/mockery/v2@v2.42.2

hack/installers/install-dev-tools.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PATH="${DIST_PATH}:${PATH}"
77

88
mkdir -p ${DIST_PATH}
99

10-
gotestsum_version=1.10.1
10+
gotestsum_version=1.11.0
1111

1212
OS=$(go env GOOS)
1313
ARCH=$(go env GOARCH)

hack/installers/install-protoc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PROJECT_ROOT=$(cd $(dirname ${BASH_SOURCE})/../..; pwd)
55
DIST_PATH="${PROJECT_ROOT}/dist"
66
PATH="${DIST_PATH}:${PATH}"
77

8-
protoc_version=3.17.3
8+
protoc_version=26.1
99

1010
OS=$(go env GOOS)
1111
ARCH=$(go env GOARCH)

hack/swagger-codegen.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

3-
export SWAGGER_CODEGEN_VERSION=3.0.25
3+
export SWAGGER_CODEGEN_VERSION=3.0.54
44
PROJECT_ROOT=$(cd $(dirname ${BASH_SOURCE})/..; pwd)
55

66
test -f "$PROJECT_ROOT/dist/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar" || \
77
curl https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/${SWAGGER_CODEGEN_VERSION}/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar -o "$PROJECT_ROOT/dist/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar"
88

9-
docker run --rm -v $PROJECT_ROOT:/src -w /src/ui -t maven:3-jdk-8 java -jar /src/dist/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar $@
9+
docker run --rm -v "$PROJECT_ROOT:/src" -w /src/ui -t maven:3-jdk-11-slim java -jar /src/dist/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar "$@"

manifests/crds/analysis-run-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.13.0
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
name: analysisruns.argoproj.io
77
spec:
88
group: argoproj.io

manifests/crds/analysis-template-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.13.0
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
name: analysistemplates.argoproj.io
77
spec:
88
group: argoproj.io

manifests/crds/cluster-analysis-template-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.13.0
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
name: clusteranalysistemplates.argoproj.io
77
spec:
88
group: argoproj.io

manifests/crds/experiment-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.13.0
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
name: experiments.argoproj.io
77
spec:
88
group: argoproj.io

manifests/crds/rollout-crd.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.13.0
5+
controller-gen.kubebuilder.io/version: v0.14.0
66
name: rollouts.argoproj.io
77
spec:
88
group: argoproj.io

0 commit comments

Comments
 (0)