Skip to content

Commit

Permalink
fix(vm): delete wrapped strings
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Antoshin <[email protected]>
  • Loading branch information
danilrwx committed Nov 27, 2024
1 parent 9ff5569 commit 86fd508
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func (h LifeCycleHandler) ensureVirtualDiskSnapshots(ctx context.Context, vmSnap
}

//nolint:staticcheck
vdSnapshotReady, _ := conditions.GetCondition(conditions.DeprecatedWrappedString(vdscondition.VirtualDiskSnapshotReadyType), vdSnapshot.Status.Conditions)
vdSnapshotReady, _ := conditions.GetCondition(vdscondition.VirtualDiskSnapshotReadyType, vdSnapshot.Status.Conditions)
if vdSnapshotReady.Reason == vdscondition.VirtualDiskSnapshotFailed.String() || vdSnapshot.Status.Phase == virtv2.VirtualDiskSnapshotPhaseFailed {
return nil, fmt.Errorf("the virtual disk snapshot %q is failed: %w. %s", vdSnapshot.Name, ErrCannotTakeSnapshot, vdSnapshotReady.Message)
}
Expand Down Expand Up @@ -450,13 +450,13 @@ func (h LifeCycleHandler) ensureBlockDeviceConsistency(ctx context.Context, vm *
}

//nolint:staticcheck
ready, _ := conditions.GetCondition(conditions.DeprecatedWrappedString(vdcondition.ReadyType), vd.Status.Conditions)
ready, _ := conditions.GetCondition(vdcondition.ReadyType, vd.Status.Conditions)
if ready.Status != metav1.ConditionTrue {
return fmt.Errorf("%w: waiting for the Ready condition of the virtual disk %q to be True", ErrVirtualDiskResizing, vd.Name)
}

//nolint:staticcheck
resizingReady, _ := conditions.GetCondition(conditions.DeprecatedWrappedString(vdcondition.ResizedType), vd.Status.Conditions)
resizingReady, _ := conditions.GetCondition(vdcondition.ResizedType, vd.Status.Conditions)
if resizingReady.Reason == vdcondition.InProgress.String() {
return fmt.Errorf("%w: waiting for the virtual disk %q to be resized", ErrVirtualDiskResizing, vd.Name)
}
Expand Down

0 comments on commit 86fd508

Please sign in to comment.