Skip to content

Commit 09aefe9

Browse files
committed
[release-v2.13] update go version to 1.25
1 parent dc58ceb commit 09aefe9

12 files changed

Lines changed: 148 additions & 130 deletions

File tree

.github/workflows/apidiff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
fetch-depth: 0
1313
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
1414
with:
15-
go-version: 1.24.x
15+
go-version: 1.25.x
1616
- name: Generate API diff
1717
run: make apidiff

.github/workflows/e2e-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install Go
4949
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
5050
with:
51-
go-version: 1.24.x
51+
go-version: 1.25.x
5252
- uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
5353
with:
5454
version: v0.23.0

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1818
with:
19-
go-version: 1.24.x
19+
go-version: 1.25.x
2020
- name: Analysis
21-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6
21+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
2222
with:
2323
args: -v

.github/workflows/unit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install Go
1414
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1515
with:
16-
go-version: 1.24.x
16+
go-version: 1.25.x
1717
- name: Run tests
1818
run: |
1919
make test

.github/workflows/verify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install Go
1414
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1515
with:
16-
go-version: 1.24.x
16+
go-version: 1.25.x
1717
- name: Run make verify
1818
run: |
1919
make verify

.golangci.yml

Lines changed: 104 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,111 @@
1+
version: "2"
12
run:
23
timeout: 5m
3-
go: "1.24"
4+
go: "1.25"
45
tests: false
56
allow-parallel-runners: true
6-
7-
output:
8-
formats:
9-
- format: github-actions
10-
117
linters:
12-
disable-all: true
8+
default: none
139
enable:
14-
- dupl # check duplicated code
15-
- goconst # check strings that can turn into constants
16-
- gofmt # check fmt
17-
- goimports # check imports
18-
- gosec # check for security problems
19-
- govet # check vet
20-
- importas # check consistent import aliasing
21-
- ineffassign # check ineffectual assignments
22-
- misspell # check for misspelled English words
23-
- nakedret # check naked returns in functions
24-
- prealloc # check preallocated slice declarations
25-
- revive # replacement for golint
26-
- unconvert # check redundant type conversions
27-
- whitespace # check for trailing whitespace and tabs
28-
linters-settings:
29-
revive:
30-
rules:
31-
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
32-
- name: blank-imports
33-
- name: context-as-argument
34-
- name: context-keys-type
35-
- name: dot-imports
36-
- name: error-return
37-
- name: error-strings
38-
- name: error-naming
39-
- name: exported
40-
- name: increment-decrement
41-
- name: var-naming
42-
- name: var-declaration
43-
- name: package-comments
44-
- name: range
45-
- name: receiver-naming
46-
- name: time-naming
47-
- name: indent-error-flow
48-
- name: errorf
49-
- name: empty-block
50-
- name: superfluous-else
51-
- name: unused-parameter
52-
- name: unreachable-code
53-
- name: redefines-builtin-id
54-
importas:
55-
no-unaliased: true
56-
alias:
57-
# Kubernetes
58-
- pkg: k8s.io/api/core/v1
59-
alias: corev1
60-
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
61-
alias: apiextensionsv1
62-
- pkg: k8s.io/api/apps/v1
63-
alias: appsv1
64-
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
65-
alias: metav1
66-
- pkg: k8s.io/apimachinery/pkg/util/runtime
67-
alias: utilruntime
68-
- pkg: sigs.k8s.io/controller-runtime/pkg/client
69-
alias: runtimeclient
70-
- pkg: k8s.io/apimachinery/pkg/util/errors
71-
alias: kerrors
72-
- pkg: k8s.io/client-go/kubernetes/scheme
73-
alias: clientgoscheme
74-
# Rancher GKE operator
75-
- pkg: github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1
76-
alias: gkev1
77-
- pkg: github.com/rancher/gke-operator/pkg/generated/controllers/gke.cattle.io/v1
78-
alias: gkecontrollers
79-
# Golang API
80-
- pkg: google.golang.org/api/container/v1
81-
alias: gkeapi
82-
issues:
83-
exclude-rules:
84-
- linters:
10+
- dupl
11+
- goconst
12+
- gosec
13+
- govet
14+
- importas
15+
- ineffassign
16+
- misspell
17+
- nakedret
18+
- prealloc
8519
- revive
86-
text: "var-naming: don't use an underscore in package name"
87-
path: 'mock(\w+)/doc.go$'
88-
exclude-dirs:
89-
- pkg/generated
90-
exclude-files:
91-
- "zz_generated_*"
20+
- unconvert
21+
- whitespace
22+
settings:
23+
importas:
24+
alias:
25+
- pkg: k8s.io/api/core/v1
26+
alias: corev1
27+
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
28+
alias: apiextensionsv1
29+
- pkg: k8s.io/api/apps/v1
30+
alias: appsv1
31+
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
32+
alias: metav1
33+
- pkg: k8s.io/apimachinery/pkg/util/runtime
34+
alias: utilruntime
35+
- pkg: sigs.k8s.io/controller-runtime/pkg/client
36+
alias: runtimeclient
37+
- pkg: k8s.io/apimachinery/pkg/api/errors
38+
alias: apierrors
39+
- pkg: k8s.io/apimachinery/pkg/util/errors
40+
alias: kerrors
41+
- pkg: k8s.io/client-go/kubernetes/scheme
42+
alias: clientgoscheme
43+
- pkg: github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1
44+
alias: aksv1
45+
- pkg: github.com/rancher/aks-operator/pkg/generated/controllers/aks.cattle.io/v1
46+
alias: akscontrollers
47+
- pkg: github.com/rancher/rancher/pkg/apis/management.cattle.io/v3
48+
alias: managementv3
49+
no-unaliased: true
50+
revive:
51+
rules:
52+
- name: blank-imports
53+
- name: context-as-argument
54+
- name: context-keys-type
55+
- name: dot-imports
56+
- name: error-return
57+
- name: error-strings
58+
- name: error-naming
59+
- name: exported
60+
- name: increment-decrement
61+
- name: var-naming
62+
- name: var-declaration
63+
- name: package-comments
64+
- name: range
65+
- name: receiver-naming
66+
- name: time-naming
67+
- name: indent-error-flow
68+
- name: errorf
69+
- name: empty-block
70+
- name: superfluous-else
71+
- name: unused-parameter
72+
- name: unreachable-code
73+
- name: redefines-builtin-id
74+
exclusions:
75+
generated: lax
76+
presets:
77+
- comments
78+
- common-false-positives
79+
- legacy
80+
- std-error-handling
81+
rules:
82+
- linters:
83+
- revive
84+
path: mock(\w+)/doc.go$
85+
text: 'var-naming: don''t use an underscore in package name'
86+
- linters:
87+
- revive
88+
path: utils/
89+
text: 'var-naming: avoid meaningless package names'
90+
- linters:
91+
- importas
92+
path: controller/gke-cluster-config-handler.go$
93+
text: 'imported without alias but must be with alias "apierrors"'
94+
paths:
95+
- zz_generated_*
96+
- pkg/generated
97+
- third_party$
98+
- builtin$
99+
- examples$
100+
formatters:
101+
enable:
102+
- gofmt
103+
- goimports
104+
exclusions:
105+
generated: lax
106+
paths:
107+
- zz_generated_*
108+
- pkg/generated
109+
- third_party$
110+
- builtin$
111+
- examples$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ GINKGO_VER := v2.28.1
3535
GINKGO_BIN := ginkgo
3636
GINKGO := $(BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
3737

38-
GO_APIDIFF_VER := v0.8.2
38+
GO_APIDIFF_VER := v0.8.3
3939
GO_APIDIFF_BIN := go-apidiff
4040
GO_APIDIFF := $(BIN_DIR)/$(GO_APIDIFF_BIN)-$(GO_APIDIFF_VER)
4141

go.mod

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/rancher/gke-operator
22

3-
go 1.24.0
4-
5-
toolchain go1.24.12
3+
go 1.25.11
64

75
replace (
86
k8s.io/client-go => k8s.io/client-go v0.34.1
@@ -22,7 +20,7 @@ require (
2220
github.com/rancher/wrangler-api v0.6.1-0.20200427172631-a7c2f09b783e
2321
github.com/rancher/wrangler/v3 v3.3.1
2422
github.com/sirupsen/logrus v1.9.4
25-
golang.org/x/net v0.49.0
23+
golang.org/x/net v0.55.0
2624
golang.org/x/oauth2 v0.35.0
2725
google.golang.org/api v0.265.0
2826
k8s.io/api v0.34.1
@@ -84,21 +82,21 @@ require (
8482
github.com/x448/float16 v0.8.4 // indirect
8583
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
8684
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
87-
go.opentelemetry.io/otel v1.39.0 // indirect
88-
go.opentelemetry.io/otel/metric v1.39.0 // indirect
89-
go.opentelemetry.io/otel/trace v1.39.0 // indirect
85+
go.opentelemetry.io/otel v1.44.0 // indirect
86+
go.opentelemetry.io/otel/metric v1.44.0 // indirect
87+
go.opentelemetry.io/otel/trace v1.44.0 // indirect
9088
go.uber.org/multierr v1.11.0 // indirect
9189
go.uber.org/zap v1.27.0 // indirect
9290
go.yaml.in/yaml/v2 v2.4.2 // indirect
9391
go.yaml.in/yaml/v3 v3.0.4 // indirect
94-
golang.org/x/crypto v0.47.0 // indirect
95-
golang.org/x/mod v0.32.0 // indirect
96-
golang.org/x/sync v0.19.0 // indirect
97-
golang.org/x/sys v0.40.0 // indirect
98-
golang.org/x/term v0.39.0 // indirect
99-
golang.org/x/text v0.33.0 // indirect
92+
golang.org/x/crypto v0.52.0 // indirect
93+
golang.org/x/mod v0.35.0 // indirect
94+
golang.org/x/sync v0.20.0 // indirect
95+
golang.org/x/sys v0.45.0 // indirect
96+
golang.org/x/term v0.43.0 // indirect
97+
golang.org/x/text v0.37.0 // indirect
10098
golang.org/x/time v0.14.0 // indirect
101-
golang.org/x/tools v0.41.0 // indirect
99+
golang.org/x/tools v0.44.0 // indirect
102100
golang.org/x/tools/go/expect v0.1.0-deprecated // indirect
103101
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
104102
google.golang.org/grpc v1.79.3 // indirect

0 commit comments

Comments
 (0)