Remove tautology

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
Matheus Pimenta 2025-08-09 18:36:43 +01:00
parent cf5702068b
commit ee651bf8b7
No known key found for this signature in database
GPG Key ID: 929AEFAE644BF334
1 changed files with 4 additions and 9 deletions

View File

@ -283,16 +283,11 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
conditions.MarkReconciling(req.Object, meta.ProgressingWithRetryReason, "%s", conditions.GetMessage(req.Object, meta.ReadyCondition)) conditions.MarkReconciling(req.Object, meta.ProgressingWithRetryReason, "%s", conditions.GetMessage(req.Object, meta.ReadyCondition))
return ErrMustRequeue return ErrMustRequeue
} }
// Check if retries have exhausted after remediation for early
// stall condition detection.
if remediation != nil && remediation.RetriesExhausted(req.Object) {
conditions.MarkStalled(req.Object, "RetriesExceeded", "Failed to %s after %d attempt(s)",
req.Object.Status.LastAttemptedReleaseAction, req.Object.GetActiveRemediation().GetFailureCount(req.Object))
return ErrExceededMaxRetries
}
conditions.Delete(req.Object, meta.ReconcilingCondition) // Retries have exhausted after remediation for early stall condition detection.
return nil conditions.MarkStalled(req.Object, "RetriesExceeded", "Failed to %s after %d attempt(s)",
req.Object.Status.LastAttemptedReleaseAction, req.Object.GetActiveRemediation().GetFailureCount(req.Object))
return ErrExceededMaxRetries
} }
// Append the type to the set of action types we have performed. // Append the type to the set of action types we have performed.