17301: Fold subsequent messages into details
authorPeter Amstutz <peter.amstutz@curii.com>
Wed, 20 Apr 2022 13:46:50 +0000 (09:46 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Wed, 20 Apr 2022 13:46:50 +0000 (09:46 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

sdk/cwl/arvados_cwl/arvcontainer.py
sdk/cwl/arvados_cwl/executor.py

index c85443a23af10cbe88bdb7bba1f51978d431efcb..b04fb190e963e965524679bb4473767820e8b849 100644 (file)
@@ -394,7 +394,7 @@ class ArvadosContainer(JobBase):
                     processStatus = "permanentFail"
 
                 if rcode == 137:
-                    logger.warning("%s job was killed on the compute instance.  The most common reason is that it attempted to allocate too much RAM and was targeted by the Out Of Memory (OOM) killer.  Try resubmitting with a higher 'ramMin'.",
+                    logger.warning("%s This container was killed on the compute instance.  The most common reason is that it attempted to allocate too much RAM and was targeted by the Out Of Memory (OOM) killer.  Try resubmitting with a higher 'ramMin'.",
                                  self.arvrunner.label(self))
             else:
                 processStatus = "permanentFail"
index f04f3047606e74d79f26231a080595e79b8aee5a..6cc971afa7f6076bd3538bdb5bc127b8a5289a0f 100644 (file)
@@ -264,16 +264,16 @@ The 'jobs' API is no longer supported.
             # In case of status being an error, only report the first one.
             if kind in ('error', 'warning', 'activity'):
                 updatemessage = runtime_status.get(kind, "")
-                if updatemessage:
-                    updatemessage += "\n"
-                updatemessage += message
+                if not updatemessage:
+                    updatemessage = message;
 
-                # Subsequent messages tacked on as detail
+                # Subsequent messages tacked on in detail
                 updatedetail = runtime_status.get(kind+'Detail', "")
                 if updatedetail:
-                   updatedetail += "\n"
+                    updatedetail += "\n"
+                updatedetail += message + "\n"
                 if detail:
-                    updatedetail += message + "\n" + detail
+                    updatedetail += detail + "\n"
                 runtime_status.update({
                     kind: updatemessage,
                     kind+'Detail': updatedetail,