Skip to content

Commit f4cf047

Browse files
authored
Merge pull request #3667 from chrischdi/pr-12-go-1-24-10
[release-1.12] 🌱 Bump Go to 1.24.10
2 parents 0a21fad + 30f5314 commit f4cf047

File tree

11 files changed

+19
-17
lines changed

11 files changed

+19
-17
lines changed

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

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

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ linters:
2121
- durationcheck
2222
- errcheck
2323
- errchkjson
24-
- exportloopref
2524
- gci
2625
- ginkgolinter
2726
- goconst

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

controllers/vspherecluster_reconciler.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,7 @@ func (r *clusterReconciler) controlPlaneMachineToCluster(ctx context.Context, o
443443
}
444444

445445
return []ctrl.Request{{
446-
NamespacedName: types.NamespacedName{
447-
Namespace: vsphereClusterKey.Namespace,
448-
Name: vsphereClusterKey.Name,
449-
},
446+
NamespacedName: vsphereClusterKey,
450447
}}
451448
}
452449

controllers/vspherecluster_reconciler_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
119119
// Make sure the VSphereCluster exists.
120120
Eventually(func() error {
121121
return testEnv.Get(ctx, key, instance)
122-
}, timeout).Should(BeNil())
122+
}, timeout).Should(Succeed())
123123

124124
By("setting the OwnerRef on the VSphereCluster")
125125
Eventually(func() error {
@@ -132,7 +132,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
132132
UID: "blah",
133133
})
134134
return ph.Patch(ctx, instance, patch.WithStatusObservedGeneration{})
135-
}, timeout).Should(BeNil())
135+
}, timeout).Should(Succeed())
136136

137137
Eventually(func() bool {
138138
if err := testEnv.Get(ctx, key, instance); err != nil {
@@ -395,7 +395,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
395395
Expect(err).ShouldNot(HaveOccurred())
396396
zoneOne.Status.Ready = ptr.To(true)
397397
return ph.Patch(ctx, zoneOne, patch.WithStatusObservedGeneration{})
398-
}, timeout).Should(BeNil())
398+
}, timeout).Should(Succeed())
399399

400400
Eventually(func() bool {
401401
if err := testEnv.Get(ctx, key, instance); err != nil {
@@ -414,7 +414,7 @@ var _ = Describe("VIM based VSphere ClusterReconciler", func() {
414414
Expect(err).ShouldNot(HaveOccurred())
415415
zoneOne.Status.Ready = ptr.To(true)
416416
return ph.Patch(ctx, zoneOne, patch.WithStatusObservedGeneration{})
417-
}, timeout).Should(BeNil())
417+
}, timeout).Should(Succeed())
418418
})
419419

420420
It("should remove the FailureDomainsAvailable condition from the cluster", func() {

controllers/vspheremachine_controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ var _ = Describe("VsphereMachineReconciler", func() {
166166
Expect(err).ShouldNot(HaveOccurred())
167167
capiCluster.Status.InfrastructureReady = true
168168
return ph.Patch(ctx, capiCluster, patch.WithStatusObservedGeneration{})
169-
}, timeout).Should(BeNil())
169+
}, timeout).Should(Succeed())
170170

171171
Eventually(func() bool {
172172
return isPresentAndFalseWithReason(infraMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForClusterInfrastructureReason)
@@ -199,7 +199,7 @@ var _ = Describe("VsphereMachineReconciler", func() {
199199
DataSecretName: ptr.To("some-secret"),
200200
}
201201
return ph.Patch(ctx, capiMachine, patch.WithStatusObservedGeneration{})
202-
}, timeout).Should(BeNil())
202+
}, timeout).Should(Succeed())
203203

204204
Eventually(func() int {
205205
vms := infrav1.VSphereVMList{}

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-provider-vsphere
22

33
go 1.22.0
44

5+
godebug default=go1.22
6+
57
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.9.1
68

79
replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505

packaging/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-provider-vsphere/packaging
22

33
go 1.22.7
44

5+
godebug default=go1.22
6+
57
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.9.1
68

79
replace sigs.k8s.io/cluster-api-provider-vsphere => ../

pkg/services/govmomi/ipam/status_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func Test_buildIPAMDeviceConfigs(t *testing.T) {
218218
// The IPAddressClaimed condition should not be added
219219
config, err := buildIPAMDeviceConfigs(ctx, vmCtx, networkStatus)
220220
g.Expect(err).NotTo(gomega.HaveOccurred())
221-
g.Expect(config[0].IPAMAddresses).To(gomega.HaveLen(0))
221+
g.Expect(config[0].IPAMAddresses).To(gomega.BeEmpty())
222222
})
223223
}
224224

@@ -435,7 +435,7 @@ func Test_BuildState(t *testing.T) {
435435

436436
state, err := BuildState(ctx, vmCtx, networkStatus)
437437
g.Expect(err).NotTo(gomega.HaveOccurred())
438-
g.Expect(state).To(gomega.HaveLen(0))
438+
g.Expect(state).To(gomega.BeEmpty())
439439
})
440440

441441
t.Run("when one device has no pool and is DHCP true, and one device has a IPAddressPool", func(_ *testing.T) {

test/e2e/multivc_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ func VerifyMultiVC(ctx context.Context, input MultiVCenterSpecInput) {
138138
Consistently(func() error {
139139
kubeSystem := &corev1.Namespace{}
140140
return input.Global.BootstrapClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: "kube-system"}, kubeSystem)
141-
}, "5s", "100ms").Should(BeNil(), "Failed to assert bootstrap API server stability")
141+
}, "5s", "100ms").Should(Succeed(), "Failed to assert bootstrap API server stability")
142142
Consistently(func() error {
143143
kubeSystem := &corev1.Namespace{}
144144
return mgmtClusterProxy.GetClient().Get(ctx, client.ObjectKey{Name: "kube-system"}, kubeSystem)
145-
}, "5s", "100ms").Should(BeNil(), "Failed to assert self-hosted API server stability")
145+
}, "5s", "100ms").Should(Succeed(), "Failed to assert self-hosted API server stability")
146146

147147
// Get the machines of the workloadCluster before it is moved to become self-hosted to make sure that the move did not trigger
148148
// any unexpected rollouts.

0 commit comments

Comments
 (0)