[arvados] updated: 2.1.0-2884-g6c485358d

git repository hosting git at public.arvados.org
Thu Sep 8 21:22:09 UTC 2022


Summary of changes:
 sdk/cwl/arvados_cwl/executor.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

       via  6c485358d6ba94bc2441c06815e5001dae325420 (commit)
      from  26f7d044fee19380875dbe21885d27be920d34f0 (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 6c485358d6ba94bc2441c06815e5001dae325420
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Sep 8 17:13:08 2022 -0400

    19464: Include "git describe" in workflow name
    
    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 07e574e1f..beb3929da 100644
--- a/sdk/cwl/arvados_cwl/executor.py
+++ b/sdk/cwl/arvados_cwl/executor.py
@@ -542,6 +542,7 @@ The 'jobs' API is no longer supported.
             git_branch = subprocess.run(["git", "branch", "--show-current"], cwd=cwd, capture_output=True, text=True).stdout
             git_origin = subprocess.run(["git", "remote", "get-url", "origin"], cwd=cwd, capture_output=True, text=True).stdout
             git_status = subprocess.run(["git", "status", "--untracked-files=no", "--porcelain"], cwd=cwd, capture_output=True, text=True).stdout
+            git_describe = subprocess.run(["git", "describe", "--always"], cwd=cwd, capture_output=True, text=True).stdout
 
             gitproperties = {
                 "http://arvados.org/cwl#gitCommit": git_commit.strip(),
@@ -550,6 +551,7 @@ The 'jobs' API is no longer supported.
                 "http://arvados.org/cwl#gitBranch": git_branch.strip(),
                 "http://arvados.org/cwl#gitOrigin": git_origin.strip(),
                 "http://arvados.org/cwl#gitStatus": git_status.strip(),
+                "http://arvados.org/cwl#gitDescribe": git_describe.strip(),
             }
         else:
             for g in ("http://arvados.org/cwl#gitCommit",
@@ -557,7 +559,8 @@ The 'jobs' API is no longer supported.
                       "http://arvados.org/cwl#gitCommitter",
                       "http://arvados.org/cwl#gitBranch",
                       "http://arvados.org/cwl#gitOrigin",
-                      "http://arvados.org/cwl#gitStatus"):
+                      "http://arvados.org/cwl#gitStatus",
+                      "http://arvados.org/cwl#gitDescribe"):
                 if g in tool.metadata:
                     gitproperties[g] = tool.metadata[g]
 
@@ -606,7 +609,10 @@ The 'jobs' API is no longer supported.
             runtimeContext.intermediate_storage_classes = default_storage_classes
 
         if not runtimeContext.name:
-            runtimeContext.name = self.name = updated_tool.tool.get("label") or updated_tool.metadata.get("label") or os.path.basename(updated_tool.tool["id"])
+            self.name = updated_tool.tool.get("label") or updated_tool.metadata.get("label") or os.path.basename(updated_tool.tool["id"])
+            if git_info.get("http://arvados.org/cwl#gitDescribe"):
+                self.name = "%s (%s)" % (self.name, git_info.get("http://arvados.org/cwl#gitDescribe"))
+            runtimeContext.name = self.name
 
         if runtimeContext.copy_deps is None and (runtimeContext.create_workflow or runtimeContext.update_workflow):
             # When creating or updating workflow record, by default

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list