[ARVADOS] updated: 2.1.0-1461-ga5804b1e5

Git user git at public.arvados.org
Wed Oct 6 19:49:21 UTC 2021


Summary of changes:
 lib/crunchrun/singularity.go  |  7 ++++---
 sdk/cwl/arvados_cwl/runner.py | 15 +++++++++++----
 2 files changed, 15 insertions(+), 7 deletions(-)

       via  a5804b1e5b04f8f4d0fb1ca67cf7fe8f15d61ec1 (commit)
      from  1441208182ced30e28f05611fbfa51674570dd1e (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 a5804b1e5b04f8f4d0fb1ca67cf7fe8f15d61ec1
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Oct 6 15:48:19 2021 -0400

    Fix setting HOME on singularity.  Fix a-c-r secondaryFiles.
    
    To fix CWL conformance tests.
    
    refs #18238
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/lib/crunchrun/singularity.go b/lib/crunchrun/singularity.go
index 99c5cef95..a768dbfa2 100644
--- a/lib/crunchrun/singularity.go
+++ b/lib/crunchrun/singularity.go
@@ -252,11 +252,12 @@ func (e *singularityExecutor) Start() error {
 	env := make([]string, 0, len(e.spec.Env))
 	for k, v := range e.spec.Env {
 		if k == "HOME" {
-			// $HOME is a special case
+			// $HOME is a special case on Singularity 3.5,
+			// but is just a normal variable on Singularity 3.6+
+			// I think this will work with both
 			args = append(args, "--home="+v)
-		} else {
-			env = append(env, "SINGULARITYENV_"+k+"="+v)
 		}
+		env = append(env, "SINGULARITYENV_"+k+"="+v)
 	}
 
 	args = append(args, e.imageFilename)
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 126a2b511..ada64ae69 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -184,7 +184,7 @@ def set_secondary(fsaccess, builder, inputschema, secondaryspec, primary, discov
             elif isinstance(pattern, dict):
                 specs.append(pattern)
             elif isinstance(pattern, str):
-                specs.append({"pattern": pattern})
+                specs.append({"pattern": pattern, "required": sf.get("required")})
             else:
                 raise SourceLine(primary["secondaryFiles"], i, validate.ValidationException).makeError(
                     "Expression must return list, object, string or null")
@@ -193,7 +193,9 @@ def set_secondary(fsaccess, builder, inputschema, secondaryspec, primary, discov
         for i, sf in enumerate(specs):
             if isinstance(sf, dict):
                 if sf.get("class") == "File":
-                    pattern = sf["basename"]
+                    pattern = None
+                    sfpath = sf["location"]
+                    required = True
                 else:
                     pattern = sf["pattern"]
                     required = sf.get("required")
@@ -204,11 +206,16 @@ def set_secondary(fsaccess, builder, inputschema, secondaryspec, primary, discov
                 raise SourceLine(primary["secondaryFiles"], i, validate.ValidationException).makeError(
                     "Expression must return list, object, string or null")
 
-            sfpath = substitute(primary["location"], pattern)
+            if pattern is not None:
+                sfpath = substitute(primary["location"], pattern)
+
             required = builder.do_eval(required, context=primary)
 
             if fsaccess.exists(sfpath):
-                found.append({"location": sfpath, "class": "File"})
+                if pattern is not None:
+                    found.append({"location": sfpath, "class": "File"})
+                else:
+                    found.append(sf)
             elif required:
                 raise SourceLine(primary["secondaryFiles"], i, validate.ValidationException).makeError(
                     "Required secondary file '%s' does not exist" % sfpath)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list