[arvados] updated: 2.1.0-2888-g3cfe5fc65
git repository hosting
git at public.arvados.org
Thu Sep 8 22:42:55 UTC 2022
Summary of changes:
sdk/cwl/arvados_cwl/arvcontainer.py | 2 ++
sdk/cwl/arvados_cwl/executor.py | 7 +++++++
2 files changed, 9 insertions(+)
via 3cfe5fc65c2883cef65087e016b8f6210d23cc8e (commit)
via 8032cee83c73d333a6b20c400e86f0d17b8da273 (commit)
from bb1e867b5ed774d99b2291348f8a6bfa8c57325e (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 3cfe5fc65c2883cef65087e016b8f6210d23cc8e
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Sep 8 18:42:19 2022 -0400
19464: Misspelled items
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py
index 35d4622c6..34d50c1b6 100644
--- a/sdk/cwl/arvados_cwl/executor.py
+++ b/sdk/cwl/arvados_cwl/executor.py
@@ -574,7 +574,7 @@ The 'jobs' API is no longer supported.
def set_container_request_properties(self, container, properties):
resp = self.api.container_requests().list(filters=[["container_uuid", "=", container["uuid"]]], select=["uuid", "properties"]).execute(num_retries=self.num_retries)
- for cr in resp["item"]:
+ for cr in resp["items"]:
cr["properties"].update({k.replace("http://arvados.org/cwl#", "arv:"): v for k, v in properties.items()})
self.api.container_requests().update(uuid=cr["uuid"], body={"container_request": {"properties": cr["properties"]}}).execute(num_retries=self.num_retries)
commit 8032cee83c73d333a6b20c400e86f0d17b8da273
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Sep 8 18:37:20 2022 -0400
19464: Record git info as properties
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index c763cb7ef..e9b58bc83 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -524,6 +524,8 @@ class RunnerContainer(Runner):
if self.embedded_tool.tool.get("id", "").startswith("arvwf:"):
container_req["properties"]["template_uuid"] = self.embedded_tool.tool["id"][6:33]
+ container_req["properties"].update({k.replace("http://arvados.org/cwl#", "arv:"): v for k, v in git_info.items()})
+
properties_req, _ = self.embedded_tool.get_requirement("http://arvados.org/cwl#ProcessProperties")
if properties_req:
builder = make_builder(self.job_order, self.embedded_tool.hints, self.embedded_tool.requirements, runtimeContext, self.embedded_tool.metadata)
diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py
index f32c18941..35d4622c6 100644
--- a/sdk/cwl/arvados_cwl/executor.py
+++ b/sdk/cwl/arvados_cwl/executor.py
@@ -572,6 +572,12 @@ The 'jobs' API is no longer supported.
return gitproperties
+ def set_container_request_properties(self, container, properties):
+ resp = self.api.container_requests().list(filters=[["container_uuid", "=", container["uuid"]]], select=["uuid", "properties"]).execute(num_retries=self.num_retries)
+ for cr in resp["item"]:
+ cr["properties"].update({k.replace("http://arvados.org/cwl#", "arv:"): v for k, v in properties.items()})
+ self.api.container_requests().update(uuid=cr["uuid"], body={"container_request": {"properties": cr["properties"]}}).execute(num_retries=self.num_retries)
+
def arv_executor(self, updated_tool, job_order, runtimeContext, logger=None):
self.debug = runtimeContext.debug
@@ -776,6 +782,7 @@ The 'jobs' API is no longer supported.
current_container = arvados_cwl.util.get_current_container(self.api, self.num_retries, logger)
if current_container:
logger.info("Running inside container %s", current_container.get("uuid"))
+ self.set_container_request_properties(current_container, git_info)
self.poll_api = arvados.api('v1', timeout=runtimeContext.http_timeout)
self.polling_thread = threading.Thread(target=self.poll_states)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list