diff --git a/.github/workflows/pr-golangci-lint.yaml b/.github/workflows/pr-golangci-lint.yaml index 6b0205c1b534..2cfb083e93b3 100644 --- a/.github/workflows/pr-golangci-lint.yaml +++ b/.github/workflows/pr-golangci-lint.yaml @@ -30,7 +30,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # tag=v6.5.1 with: - version: v1.63.4 + version: v1.64.3 args: --out-format=colored-line-number working-directory: ${{matrix.working-directory}} - name: Lint API diff --git a/Makefile b/Makefile index 7e7547e3b69a..c9a16310739f 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash # # Go. # -GO_VERSION ?= 1.23.12 +GO_VERSION ?= 1.24.9 GO_DIRECTIVE_VERSION ?= 1.23.0 GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION) diff --git a/Tiltfile b/Tiltfile index f324897f886e..ce0de5e8a090 100644 --- a/Tiltfile +++ b/Tiltfile @@ -172,9 +172,9 @@ def load_provider_tilt_files(): tilt_helper_dockerfile_header = """ # Tilt image -FROM golang:1.23.12 as tilt-helper +FROM golang:1.24.9 as tilt-helper # Install delve. Note this should be kept in step with the Go release minor version. -RUN go install github.com/go-delve/delve/cmd/dlv@v1.23 +RUN go install github.com/go-delve/delve/cmd/dlv@v1.24 # Support live reloading with Tilt RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \ 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 """ tilt_dockerfile_header = """ -FROM golang:1.23.12 as tilt +FROM golang:1.24.9 as tilt WORKDIR / COPY --from=tilt-helper /process.txt . COPY --from=tilt-helper /start.sh . diff --git a/go.mod b/go.mod index 9afa2ebb278d..adf3675183ea 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module sigs.k8s.io/cluster-api go 1.23.0 +godebug default=go1.23 + require ( github.com/MakeNowJust/heredoc v1.0.0 github.com/Masterminds/sprig/v3 v3.3.0 diff --git a/hack/tools/.custom-gcl.yaml b/hack/tools/.custom-gcl.yaml index ea9e561fec4e..8dbffb29686f 100644 --- a/hack/tools/.custom-gcl.yaml +++ b/hack/tools/.custom-gcl.yaml @@ -1,5 +1,5 @@ -version: v1.63.4 -name: golangci-lint-kal-v1.63.4 +version: v1.64.3 +name: golangci-lint-kal-v1.64.3 destination: ./bin plugins: - module: 'github.com/JoelSpeed/kal' diff --git a/internal/controllers/clusterresourceset/clusterresourceset_helpers.go b/internal/controllers/clusterresourceset/clusterresourceset_helpers.go index a6e1adb01554..b26713efd8ac 100644 --- a/internal/controllers/clusterresourceset/clusterresourceset_helpers.go +++ b/internal/controllers/clusterresourceset/clusterresourceset_helpers.go @@ -146,11 +146,7 @@ func (r *Reconciler) getOrCreateClusterResourceSetBinding(ctx context.Context, c // getConfigMap retrieves any ConfigMap from the given name and namespace. func getConfigMap(ctx context.Context, c client.Client, configmapName types.NamespacedName) (*corev1.ConfigMap, error) { configMap := &corev1.ConfigMap{} - configMapKey := client.ObjectKey{ - Namespace: configmapName.Namespace, - Name: configmapName.Name, - } - if err := c.Get(ctx, configMapKey, configMap); err != nil { + if err := c.Get(ctx, configmapName, configMap); err != nil { return nil, err } @@ -160,11 +156,7 @@ func getConfigMap(ctx context.Context, c client.Client, configmapName types.Name // getSecret retrieves any Secret from the given secret name and namespace. func getSecret(ctx context.Context, c client.Client, secretName types.NamespacedName) (*corev1.Secret, error) { secret := &corev1.Secret{} - secretKey := client.ObjectKey{ - Namespace: secretName.Namespace, - Name: secretName.Name, - } - if err := c.Get(ctx, secretKey, secret); err != nil { + if err := c.Get(ctx, secretName, secret); err != nil { return nil, err } diff --git a/netlify.toml b/netlify.toml index 62e3602246a7..c52c15af9d35 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,7 +4,7 @@ publish = "docs/book/book" [build.environment] - GO_VERSION = "1.23.12" + GO_VERSION = "1.24.9" # Standard Netlify redirects [[redirects]] diff --git a/test/e2e/cluster_upgrade_runtimesdk.go b/test/e2e/cluster_upgrade_runtimesdk.go index 4c575079f989..3c22d484bedf 100644 --- a/test/e2e/cluster_upgrade_runtimesdk.go +++ b/test/e2e/cluster_upgrade_runtimesdk.go @@ -687,7 +687,7 @@ func beforeClusterDeleteHandler(ctx context.Context, c client.Client, cluster ty var blocked = true // If the Cluster is not found it has been deleted and the hook is unblocked. - if apierrors.IsNotFound(c.Get(ctx, client.ObjectKey{Name: cluster.Name, Namespace: cluster.Namespace}, &clusterv1.Cluster{})) { + if apierrors.IsNotFound(c.Get(ctx, cluster, &clusterv1.Cluster{})) { blocked = false } return blocked