Skip to content

Commit 6f49659

Browse files
committed
feat: go 1.24.1 and update all other tools
Also includes some enhancements to testing (t.Context) highlighted by golangci-lint.
1 parent e88d493 commit 6f49659

File tree

16 files changed

+325
-258
lines changed

16 files changed

+325
-258
lines changed

api/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
module github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api
55

6-
go 1.22.0
6+
go 1.24
77

8-
toolchain go1.24.0
8+
toolchain go1.24.1
99

1010
replace github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common => ../common
1111

common/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
module github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common
55

6-
go 1.22.0
6+
go 1.24
77

8-
toolchain go1.24.0
8+
toolchain go1.24.1
99

1010
require (
1111
github.com/evanphx/json-patch/v5 v5.9.11

common/pkg/capi/clustertopology/handlers/lifecycle/parallel_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func Test_runHooksInParallel(t *testing.T) {
248248

249249
gotResponse := &runtimehooksv1.BeforeClusterUpgradeResponse{}
250250
runHooksInParallel(
251-
context.Background(),
251+
t.Context(),
252252
hookFuncs,
253253
&runtimehooksv1.BeforeClusterUpgradeRequest{},
254254
gotResponse,

common/pkg/capi/clustertopology/handlers/mutation/meta_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func TestMetaGeneratePatches(t *testing.T) {
223223
h := NewMetaGeneratePatchesHandler("", nil, tt.mutaters...).(GeneratePatches)
224224

225225
resp := &runtimehooksv1.GeneratePatchesResponse{}
226-
h.GeneratePatches(context.Background(), &runtimehooksv1.GeneratePatchesRequest{
226+
h.GeneratePatches(t.Context(), &runtimehooksv1.GeneratePatchesRequest{
227227
Items: []runtimehooksv1.GeneratePatchesRequestItem{
228228
request.NewKubeadmConfigTemplateRequestItem("kubeadm-config"),
229229
request.NewKubeadmControlPlaneTemplateRequestItem("kubeadm-control-plane"),

common/pkg/testutils/capitest/variables.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package capitest
55

66
import (
7-
"context"
87
"encoding/json"
98
"testing"
109

@@ -41,7 +40,7 @@ func ValidateDiscoverVariables[T mutation.DiscoverVariables](
4140
h := handlerCreator()
4241
resp := &runtimehooksv1.DiscoverVariablesResponse{}
4342
h.DiscoverVariables(
44-
context.Background(),
43+
t.Context(),
4544
&runtimehooksv1.DiscoverVariablesRequest{},
4645
resp,
4746
)

devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
"gnused@latest",
1515
"go@latest",
1616
"gojq@latest",
17+
"golangci-lint@latest",
1718
"golines@latest",
1819
"gomplate@latest",
1920
"goreleaser@latest",
2021
"gotestsum@latest",
22+
"govulncheck@latest",
2123
"helm-docs@latest",
2224
"hugo@latest",
2325
"kind@latest",
@@ -34,9 +36,7 @@
3436
"yamllint@latest",
3537
"yq-go@latest",
3638
"path:./hack/flakes#clusterctl-aws",
37-
"path:./hack/flakes#golangci-lint",
3839
"path:./hack/flakes#goprintconst",
39-
"path:./hack/flakes#govulncheck",
4040
"path:./hack/flakes#helm-with-plugins",
4141
"path:./hack/flakes#release-please"
4242
],

0 commit comments

Comments
 (0)