Skip to content

Commit 7dc9647

Browse files
committed
Resolve conflicts with main
Signed-off-by: Borja Clemente <bclement@redhat.com>
1 parent 05fdd90 commit 7dc9647

File tree

6 files changed

+6
-106
lines changed

6 files changed

+6
-106
lines changed

api/v1beta2/awsmachinetemplate_webhook.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (r *AWSMachineTemplate) validateIgnitionAndCloudInit() field.ErrorList {
172172

173173
return allErrs
174174
}
175-
<<<<<<< HEAD
175+
176176
func (r *AWSMachineTemplate) validateHostAllocation() field.ErrorList {
177177
var allErrs field.ErrorList
178178

@@ -188,8 +188,6 @@ func (r *AWSMachineTemplate) validateHostAllocation() field.ErrorList {
188188

189189
return allErrs
190190
}
191-
=======
192-
>>>>>>> c3fc709ee (Consolidate conditions imports and fix linting)
193191

194192
func (r *AWSMachineTemplate) validateSSHKeyName() field.ErrorList {
195193
return validateSSHKeyName(r.Spec.Template.Spec.SSHKeyName)

api/v1beta2/conditions_consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const (
148148

149149
// DedicatedHostReleaseCondition reports on the status of dedicated host release operations.
150150
// This condition tracks whether the dedicated host has been successfully released or if there are failures.
151-
DedicatedHostReleaseCondition clusterv1.ConditionType = "DedicatedHostRelease"
151+
DedicatedHostReleaseCondition clusterv1beta1.ConditionType = "DedicatedHostRelease"
152152

153153
// InstanceNotFoundReason used when the instance couldn't be retrieved.
154154
InstanceNotFoundReason = "InstanceNotFound"

controllers/awsmachine_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func (r *AWSMachineReconciler) reconcileDelete(ctx context.Context, machineScope
372372
machineScope.Info("Releasing dynamically allocated dedicated host", "hostID", hostID)
373373
if err := ec2Service.ReleaseDedicatedHost(ctx, hostID); err != nil {
374374
machineScope.Error(err, "failed to release dedicated host", "hostID", hostID)
375-
conditions.MarkFalse(machineScope.AWSMachine, infrav1.DedicatedHostReleaseCondition, infrav1.DedicatedHostReleaseFailedReason, clusterv1.ConditionSeverityError, "%s", err.Error())
375+
v1beta1conditions.MarkFalse(machineScope.AWSMachine, infrav1.DedicatedHostReleaseCondition, infrav1.DedicatedHostReleaseFailedReason, clusterv1beta1.ConditionSeverityError, "%s", err.Error())
376376
r.Recorder.Eventf(machineScope.AWSMachine, corev1.EventTypeWarning, "FailedReleaseHost", "Failed to release dedicated host %s: %v", hostID, err)
377377
return ctrl.Result{}, err
378378
}
@@ -382,7 +382,7 @@ func (r *AWSMachineReconciler) reconcileDelete(ctx context.Context, machineScope
382382
r.Recorder.Eventf(machineScope.AWSMachine, corev1.EventTypeNormal, "SuccessfulReleaseHost", "Released dedicated host %s", hostID)
383383

384384
// Mark the condition as succeeded
385-
conditions.MarkTrue(machineScope.AWSMachine, infrav1.DedicatedHostReleaseCondition)
385+
v1beta1conditions.MarkTrue(machineScope.AWSMachine, infrav1.DedicatedHostReleaseCondition)
386386

387387
// Patch the object to persist success state
388388
if err := machineScope.PatchObject(); err != nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ require (
4848
github.com/sergi/go-diff v1.3.1
4949
github.com/sirupsen/logrus v1.9.3
5050
github.com/spf13/cobra v1.9.1
51-
github.com/stretchr/testify v1.10.0
5251
github.com/spf13/pflag v1.0.10
52+
github.com/stretchr/testify v1.11.1
5353
github.com/zgalor/weberr v0.8.2
5454
go.uber.org/mock v0.5.2
5555
golang.org/x/crypto v0.43.0

0 commit comments

Comments
 (0)