Skip to content

Commit 6746844

Browse files
asm582openshift-ci[bot]
authored andcommitted
fix for some AWs that do not complete
1 parent 1257d4b commit 6746844

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,10 @@ func (cc *XController) addQueueJob(obj interface{}) {
16251625
}
16261626
if latestAw.Status.State != arbv1.AppWrapperStateActive && latestAw.Status.State != arbv1.AppWrapperStateEnqueued && latestAw.Status.State != arbv1.AppWrapperStateRunningHoldCompletion {
16271627
klog.V(2).Infof("[Informer-addQJ] Stopping requeue for AW %s/%s with status %s", latestAw.Namespace, latestAw.Name, latestAw.Status.State)
1628-
break // Exit the loop
1628+
AwinEtcd, err := cc.arbclients.WorkloadV1beta1().AppWrappers(latestAw.Namespace).Get(context.Background(), latestAw.Name, metav1.GetOptions{})
1629+
if AwinEtcd.Status.State == latestAw.Status.State && err != nil {
1630+
break // Exit the loop
1631+
}
16291632
}
16301633
// Enqueue the latest copy of the AW.
16311634
if (qj.Status.State != arbv1.AppWrapperStateCompleted && qj.Status.State != arbv1.AppWrapperStateFailed) && hasCompletionStatus {

0 commit comments

Comments
 (0)