From c22d90571a1fcb4b52e5387a791e3aefff5be6af Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 20 Apr 2022 09:46:50 -0400 Subject: [PATCH] 17301: Fold subsequent messages into details Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/cwl/arvados_cwl/arvcontainer.py | 2 +- sdk/cwl/arvados_cwl/executor.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index c85443a23a..b04fb190e9 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -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" diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py index f04f304760..6cc971afa7 100644 --- a/sdk/cwl/arvados_cwl/executor.py +++ b/sdk/cwl/arvados_cwl/executor.py @@ -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, -- 2.30.2