[OOM Readiness] Check all job conditions for complete status 52/140552/2
authorAndreas Seelinger <andreas.seelinger@accenture.com>
Mon, 24 Mar 2025 09:15:03 +0000 (10:15 +0100)
committerAndreas Seelinger <andreas.seelinger@accenture.com>
Mon, 24 Mar 2025 09:23:08 +0000 (10:23 +0100)
Issue-ID: OOM-3337

Change-Id: Id15221dd531e2df4977fc46c2feca73e1eab1287
Signed-off-by: Andreas Seelinger <andreas.seelinger@accenture.com>
ready.py
version.properties

index 93676f5..eda4c93 100755 (executable)
--- a/ready.py
+++ b/ready.py
@@ -69,11 +69,12 @@ def is_job_complete(job_name):
     try:
         response = batchV1Api.read_namespaced_job_status(job_name, namespace)
         if response.status.succeeded == 1:
-            job_status_type = response.status.conditions[0].type
-            if job_status_type == "Complete":
-                complete = True
-                log.info("%s is complete", job_name)
-            else:
+            for condition in response.status.conditions:
+                if condition.type == "Complete":
+                    complete = True
+                    log.info("%s is complete", job_name)
+                    break
+            if not complete:
                 log.info("%s is NOT complete", job_name)
         else:
             log.info("%s has not succeeded yet", job_name)
index a05c677..e164ca9 100644 (file)
@@ -4,7 +4,7 @@
 
 major=6
 minor=1
-patch=1
+patch=2
 
 base_version=${major}.${minor}.${patch}