Skip to content

Commit b0a9eeb

Browse files
authored
🌱 [release-1.9] Bump go version to 1.24.10 (#12969)
* Bump go version * update golint version * fix lint issues
1 parent 01ece42 commit b0a9eeb

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

.github/workflows/pr-golangci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
- name: golangci-lint
3131
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1
3232
with:
33-
version: v1.60.2
33+
version: v1.64.3
3434
args: --out-format=colored-line-number
3535
working-directory: ${{matrix.working-directory}}

.golangci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,3 +373,14 @@ issues:
373373
- linters:
374374
- govet
375375
text: "non-constant format string in call to sigs\\.k8s\\.io\\/cluster-api\\/util\\/conditions\\."
376+
# Ignore ginkgolinter suggestions
377+
- linters:
378+
- ginkgolinter
379+
text: "(wrong error assertion|wrong comparison assertion)"
380+
path: "(^.*_test\\.go$|^test/e2e/.*\\.go$)"
381+
# Ignore intrange suggestions in targeted files only
382+
- linters:
383+
- intrange
384+
text: "for loop can be changed to `i := range machineList`"
385+
path: "(^exp/internal/controllers/machinepool_controller_phases\\.go$|^internal/controllers/machineset/machineset_controller\\.go$)"
386+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
2323
#
2424
# Go.
2525
#
26-
GO_VERSION ?= 1.23.12
26+
GO_VERSION ?= 1.24.10
2727
GO_DIRECTIVE_VERSION ?= 1.22.0
2828
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
2929

Tiltfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ def load_provider_tiltfiles():
184184

185185
tilt_helper_dockerfile_header = """
186186
# Tilt image
187-
FROM golang:1.23.12 as tilt-helper
187+
FROM golang:1.24.10 as tilt-helper
188188
# Install delve. Note this should be kept in step with the Go release minor version.
189-
RUN go install github.com/go-delve/delve/cmd/dlv@v1.22
189+
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24
190190
# Support live reloading with Tilt
191191
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
192192
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/start.sh && \
@@ -195,7 +195,7 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
195195
"""
196196

197197
tilt_dockerfile_header = """
198-
FROM golang:1.23.12 as tilt
198+
FROM golang:1.24.10 as tilt
199199
WORKDIR /
200200
COPY --from=tilt-helper /process.txt .
201201
COPY --from=tilt-helper /start.sh .

exp/addons/internal/controllers/clusterresourceset_helpers.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,7 @@ func (r *ClusterResourceSetReconciler) getOrCreateClusterResourceSetBinding(ctx
147147
// getConfigMap retrieves any ConfigMap from the given name and namespace.
148148
func getConfigMap(ctx context.Context, c client.Client, configmapName types.NamespacedName) (*corev1.ConfigMap, error) {
149149
configMap := &corev1.ConfigMap{}
150-
configMapKey := client.ObjectKey{
151-
Namespace: configmapName.Namespace,
152-
Name: configmapName.Name,
153-
}
154-
if err := c.Get(ctx, configMapKey, configMap); err != nil {
150+
if err := c.Get(ctx, configmapName, configMap); err != nil {
155151
return nil, err
156152
}
157153

@@ -161,11 +157,7 @@ func getConfigMap(ctx context.Context, c client.Client, configmapName types.Name
161157
// getSecret retrieves any Secret from the given secret name and namespace.
162158
func getSecret(ctx context.Context, c client.Client, secretName types.NamespacedName) (*corev1.Secret, error) {
163159
secret := &corev1.Secret{}
164-
secretKey := client.ObjectKey{
165-
Namespace: secretName.Namespace,
166-
Name: secretName.Name,
167-
}
168-
if err := c.Get(ctx, secretKey, secret); err != nil {
160+
if err := c.Get(ctx, secretName, secret); err != nil {
169161
return nil, err
170162
}
171163

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
publish = "docs/book/book"
55

66
[build.environment]
7-
GO_VERSION = "1.23.12"
7+
GO_VERSION = "1.24.10"
88

99
# Standard Netlify redirects
1010
[[redirects]]

test/e2e/cluster_upgrade_runtimesdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ func beforeClusterDeleteHandler(ctx context.Context, c client.Client, cluster ty
607607
var blocked = true
608608

609609
// If the Cluster is not found it has been deleted and the hook is unblocked.
610-
if apierrors.IsNotFound(c.Get(ctx, client.ObjectKey{Name: cluster.Name, Namespace: cluster.Namespace}, &clusterv1.Cluster{})) {
610+
if apierrors.IsNotFound(c.Get(ctx, cluster, &clusterv1.Cluster{})) {
611611
blocked = false
612612
}
613613
return blocked

0 commit comments

Comments
 (0)