Skip to content

Commit 37f4973

Browse files
author
Per Goncalves da Silva
committed
Surface revision retrying condition to ClusterExtension
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 9be3edf commit 37f4973

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

internal/operator-controller/applier/boxcutter.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ func (bc *Boxcutter) apply(ctx context.Context, contentFS fs.FS, ext *ocv1.Clust
363363
if progressingCondition == nil && availableCondition == nil && succeededCondition == nil {
364364
return false, "New revision created", nil
365365
} else if progressingCondition != nil && progressingCondition.Status == metav1.ConditionTrue {
366+
if progressingCondition.Reason == ocv1.ClusterExtensionRevisionReasonRetrying {
367+
return false, "", errors.New(progressingCondition.Message)
368+
}
366369
return false, progressingCondition.Message, nil
367370
} else if availableCondition != nil && availableCondition.Status != metav1.ConditionTrue {
368371
return false, "", errors.New(availableCondition.Message)

internal/operator-controller/controllers/clusterextensionrevision_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (c *ClusterExtensionRevisionReconciler) reconcile(ctx context.Context, rev
212212
l.Error(fmt.Errorf("object collision detected"), "object collision, retrying after 10s", "phase", i, "collisions", collidingObjs)
213213
// collisions are probably stickier than phase roll out probe failures - so we'd probably want to set
214214
// Progressing to false here due to the collision
215-
markAsNotProgressing(rev, ocv1.ClusterExtensionRevisionReasonRetrying, fmt.Sprintf("revision object collisions in phase %d\n%s", i, strings.Join(collidingObjs, "\n\n")))
215+
markAsProgressing(rev, ocv1.ClusterExtensionRevisionReasonRetrying, fmt.Sprintf("revision object collisions in phase %d\n%s", i, strings.Join(collidingObjs, "\n\n")))
216216

217217
// NOTE(pedjak): not sure if we want to retry here - collisions are probably not transient?
218218
return ctrl.Result{RequeueAfter: 10 * time.Second}, nil

0 commit comments

Comments
 (0)