[ARVADOS] updated: dd58470216d6a416e4d831a3b9c25bfdaa255fff

Git user git at public.curoverse.com
Mon May 22 13:06:45 EDT 2017


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py     | 11 ++++++-----
 sdk/cwl/arvados_cwl/arvcontainer.py |  5 ++++-
 sdk/cwl/arvados_cwl/runner.py       |  4 +++-
 3 files changed, 13 insertions(+), 7 deletions(-)

       via  dd58470216d6a416e4d831a3b9c25bfdaa255fff (commit)
      from  67fbf00f0d868384f1585f2473b5f89455001638 (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 dd58470216d6a416e4d831a3b9c25bfdaa255fff
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon May 22 13:06:39 2017 -0400

    11100: Propagate through to runner.  Use intermediate_output_ttl consistently.

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index e0d103c..94d602d 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -74,7 +74,7 @@ class ArvCwlRunner(object):
         self.output_name = output_name
         self.output_tags = output_tags
         self.project_uuid = None
-        self.output_ttl = 0
+        self.intermediate_output_ttl = 0
         self.intermediate_output_collections = []
 
         if keep_client is not None:
@@ -345,8 +345,8 @@ class ArvCwlRunner(object):
                                                                  collection_cache=self.collection_cache)
         self.fs_access = make_fs_access(kwargs["basedir"])
 
-        self.output_ttl = kwargs["intermediate_output_ttl"]
-        if self.output_ttl and self.work_api != "containers":
+        self.intermediate_output_ttl = kwargs["intermediate_output_ttl"]
+        if self.intermediate_output_ttl and self.work_api != "containers":
             raise Exception("--intermediate-output-ttl is only supported when using the containers api.")
 
         if not kwargs.get("name"):
@@ -428,7 +428,8 @@ class ArvCwlRunner(object):
                                                 submit_runner_ram=kwargs.get("submit_runner_ram"),
                                                 name=kwargs.get("name"),
                                                 on_error=kwargs.get("on_error"),
-                                                submit_runner_image=kwargs.get("submit_runner_image"))
+                                                submit_runner_image=kwargs.get("submit_runner_image"),
+                                                intermediate_output_ttl=kwargs.get("intermediate_output_ttl"))
             elif self.work_api == "jobs":
                 runnerjob = RunnerJob(self, tool, job_order, kwargs.get("enable_reuse"),
                                       self.output_name,
@@ -532,7 +533,7 @@ class ArvCwlRunner(object):
             adjustDirObjs(self.final_output, partial(get_listing, self.fs_access))
             adjustFileObjs(self.final_output, partial(compute_checksums, self.fs_access))
 
-        if self.output_ttl and self.final_status == "success":
+        if self.intermediate_output_ttl and self.final_status == "success":
             self.trash_intermediate_output()
 
         return (self.final_output, self.final_status)
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index fe3efcc..b195ce2 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -43,7 +43,7 @@ class ArvadosContainer(object):
             "priority": 1,
             "state": "Committed",
             "properties": {},
-            "output_ttl", self.arvrunner.output_ttl
+            "output_ttl", self.arvrunner.intermediate_output_ttl
         }
         runtime_constraints = {}
 
@@ -326,6 +326,9 @@ class RunnerContainer(Runner):
         if self.on_error:
             command.append("--on-error=" + self.on_error)
 
+        if self.intermediate_output_ttl:
+            command.append("--intermediate-output-ttl=%d" % self.intermediate_output_ttl)
+
         command.extend([workflowpath, "/var/lib/cwl/cwl.input.json"])
 
         container_req["command"] = command
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 69e4f5b..581c133 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -246,7 +246,8 @@ class Runner(object):
 
     def __init__(self, runner, tool, job_order, enable_reuse,
                  output_name, output_tags, submit_runner_ram=0,
-                 name=None, on_error=None, submit_runner_image=None):
+                 name=None, on_error=None, submit_runner_image=None,
+                 intermediate_output_ttl=0):
         self.arvrunner = runner
         self.tool = tool
         self.job_order = job_order
@@ -259,6 +260,7 @@ class Runner(object):
         self.name = name
         self.on_error = on_error
         self.jobs_image = submit_runner_image or "arvados/jobs:"+__version__
+        self.intermediate_output_ttl = intermediate_output_ttl
 
         if submit_runner_ram:
             self.submit_runner_ram = submit_runner_ram

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list