From 6746844986ffb83008b13c93eb476818f417fa7e Mon Sep 17 00:00:00 2001 From: Abhishek Malvankar Date: Tue, 10 Oct 2023 11:26:50 -0400 Subject: [PATCH] fix for some AWs that do not complete --- pkg/controller/queuejob/queuejob_controller_ex.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/controller/queuejob/queuejob_controller_ex.go b/pkg/controller/queuejob/queuejob_controller_ex.go index ae70b837..58038dc7 100644 --- a/pkg/controller/queuejob/queuejob_controller_ex.go +++ b/pkg/controller/queuejob/queuejob_controller_ex.go @@ -1625,7 +1625,10 @@ func (cc *XController) addQueueJob(obj interface{}) { } if latestAw.Status.State != arbv1.AppWrapperStateActive && latestAw.Status.State != arbv1.AppWrapperStateEnqueued && latestAw.Status.State != arbv1.AppWrapperStateRunningHoldCompletion { klog.V(2).Infof("[Informer-addQJ] Stopping requeue for AW %s/%s with status %s", latestAw.Namespace, latestAw.Name, latestAw.Status.State) - break // Exit the loop + AwinEtcd, err := cc.arbclients.WorkloadV1beta1().AppWrappers(latestAw.Namespace).Get(context.Background(), latestAw.Name, metav1.GetOptions{}) + if AwinEtcd.Status.State == latestAw.Status.State && err != nil { + break // Exit the loop + } } // Enqueue the latest copy of the AW. if (qj.Status.State != arbv1.AppWrapperStateCompleted && qj.Status.State != arbv1.AppWrapperStateFailed) && hasCompletionStatus {