X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/96f176d43e03de4ba9dbb8a446a9339cb5032cec..1dd56e127c9460713f10996a5ff8d4ddf6244b29:/sdk/cwl/arvados_cwl/executor.py diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py index f04f304760..680ca0b7b2 100644 --- a/sdk/cwl/arvados_cwl/executor.py +++ b/sdk/cwl/arvados_cwl/executor.py @@ -261,19 +261,25 @@ The 'jobs' API is no longer supported. if current is None: return runtime_status = current.get('runtime_status', {}) - # In case of status being an error, only report the first one. - if kind in ('error', 'warning', 'activity'): + if kind in ('error', 'warning'): 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" - if detail: - updatedetail += message + "\n" + detail + maxlines = 40 + if updatedetail.count("\n") < maxlines: + if updatedetail: + updatedetail += "\n" + updatedetail += message + "\n" + + if detail: + updatedetail += detail + "\n" + + if updatedetail.count("\n") >= maxlines: + updatedetail += "\nSome messages may have been omitted. Check the full log." + runtime_status.update({ kind: updatemessage, kind+'Detail': updatedetail,