Skip to content

Commit 941e4e2

Browse files
authored
[release-1.10] 🌱 Bump Go version to 1.24.9 (#12945)
* Bump GoVersion to 1.24.9 * update golangci-lint version * fix lint issues
1 parent eb0b49e commit 941e4e2

File tree

8 files changed

+13
-19
lines changed

8 files changed

+13
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: golangci-lint
3131
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # tag=v6.5.1
3232
with:
33-
version: v1.63.4
33+
version: v1.64.3
3434
args: --out-format=colored-line-number
3535
working-directory: ${{matrix.working-directory}}
3636
- name: Lint API

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.9
2727
GO_DIRECTIVE_VERSION ?= 1.23.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
@@ -172,9 +172,9 @@ def load_provider_tilt_files():
172172

173173
tilt_helper_dockerfile_header = """
174174
# Tilt image
175-
FROM golang:1.23.12 as tilt-helper
175+
FROM golang:1.24.9 as tilt-helper
176176
# Install delve. Note this should be kept in step with the Go release minor version.
177-
RUN go install github.com/go-delve/delve/cmd/dlv@v1.23
177+
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24
178178
# Support live reloading with Tilt
179179
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
180180
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/start.sh && \
@@ -183,7 +183,7 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
183183
"""
184184

185185
tilt_dockerfile_header = """
186-
FROM golang:1.23.12 as tilt
186+
FROM golang:1.24.9 as tilt
187187
WORKDIR /
188188
COPY --from=tilt-helper /process.txt .
189189
COPY --from=tilt-helper /start.sh .

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module sigs.k8s.io/cluster-api
22

33
go 1.23.0
44

5+
godebug default=go1.23
6+
57
require (
68
github.com/MakeNowJust/heredoc v1.0.0
79
github.com/Masterminds/sprig/v3 v3.3.0

hack/tools/.custom-gcl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: v1.63.4
2-
name: golangci-lint-kal-v1.63.4
1+
version: v1.64.3
2+
name: golangci-lint-kal-v1.64.3
33
destination: ./bin
44
plugins:
55
- module: 'github.com/JoelSpeed/kal'

internal/controllers/clusterresourceset/clusterresourceset_helpers.go

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

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

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.9"
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
@@ -687,7 +687,7 @@ func beforeClusterDeleteHandler(ctx context.Context, c client.Client, cluster ty
687687
var blocked = true
688688

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

0 commit comments

Comments
 (0)