[ARVADOS] updated: a4f7583ef9d76101415bace9b250df983ba7212d

Git user git at public.curoverse.com
Wed Dec 28 13:28:20 EST 2016


Summary of changes:
 sdk/cwl/arvados_cwl/done.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

       via  a4f7583ef9d76101415bace9b250df983ba7212d (commit)
      from  5af0f99a1dc3d6dbc9066c2649272abf27482ebf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a4f7583ef9d76101415bace9b250df983ba7212d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Dec 28 13:24:11 2016 -0500

    10497: Add logname (crunch-run, stdout, stderr) to container log tail

diff --git a/sdk/cwl/arvados_cwl/done.py b/sdk/cwl/arvados_cwl/done.py
index f7c72b4..7abaedf 100644
--- a/sdk/cwl/arvados_cwl/done.py
+++ b/sdk/cwl/arvados_cwl/done.py
@@ -45,6 +45,7 @@ def done_outputs(self, record, tmpdir, outdir, keepdir):
     return self.collect_outputs("keep:" + record["output"])
 
 crunchstat_re = re.compile(r"^\d\d\d\d-\d\d-\d\d_\d\d:\d\d:\d\d [a-z0-9]{5}-8i9sb-[a-z0-9]{15} \d+ \d+ stderr crunchstat:")
+timestamp_re = re.compile(r"^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d+Z) (.*)")
 
 def logtail(logcollection, logger, header, maxlen=25):
     logtail = deque([], maxlen*len(logcollection))
@@ -52,9 +53,13 @@ def logtail(logcollection, logger, header, maxlen=25):
 
     for log in logcollection.keys():
         if not containersapi or log in ("crunch-run.txt", "stdout.txt", "stderr.txt"):
+            logname = log[:-4]
             with logcollection.open(log) as f:
                 for l in f:
-                    if containersapi or not crunchstat_re.match(l):
+                    if containersapi:
+                        g = timestamp_re.match(l)
+                        logtail.append("%s %s %s" % (g.group(1), logname, g.group(2)))
+                    elif not crunchstat_re.match(l):
                         logtail.append(l)
     if len(logcollection) > 1:
         logtail = sorted(logtail)[-maxlen:]

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list