[ARVADOS] created: 1.3.0-2772-g9c5923ce6

Git user git at public.arvados.org
Mon Jul 13 20:41:28 UTC 2020


        at  9c5923ce6ac1aa71d9a5ea72b4daffa129eef30b (commit)


commit 9c5923ce6ac1aa71d9a5ea72b4daffa129eef30b
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Jun 25 17:36:19 2020 -0400

    16377: Fix CollectionFsAccess.exists to catch IOError & return False
    
    Add test to reproduce
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py
index bc2c5e34d..4688e65a3 100644
--- a/sdk/cwl/arvados_cwl/fsaccess.py
+++ b/sdk/cwl/arvados_cwl/fsaccess.py
@@ -148,6 +148,11 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess):
                 return False
             else:
                 raise
+        except IOError as err:
+            if err.errno == errno.ENOENT:
+                return False
+            else:
+                raise
         if collection is not None:
             if rest:
                 return collection.exists(rest)
diff --git a/sdk/cwl/tests/13976-keepref-wf.cwl b/sdk/cwl/tests/13976-keepref-wf.cwl
index 7aa7b0aa4..8d0dee971 100644
--- a/sdk/cwl/tests/13976-keepref-wf.cwl
+++ b/sdk/cwl/tests/13976-keepref-wf.cwl
@@ -1,11 +1,18 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 cwlVersion: v1.0
 class: CommandLineTool
 requirements:
   - class: InlineJavascriptRequirement
+  - class: ShellCommandRequirement
 arguments:
+  - cd
+  - $(inputs.hello.dirname)
+  - {shellQuote: false, valueFrom: "&&"}
   - ls
-  - -l
-  - $(inputs.hello)
+stdout: hello.out
 inputs:
   hello:
     type: File
@@ -14,4 +21,8 @@ inputs:
       location: keep:4d8a70b1e63b2aad6984e40e338e2373+69/hello.txt
     secondaryFiles:
       - .idx
-outputs: []
\ No newline at end of file
+outputs:
+  out:
+    type: File
+    outputBinding:
+      glob: hello.out
diff --git a/sdk/cwl/tests/16377-missing-default.cwl b/sdk/cwl/tests/16377-missing-default.cwl
new file mode 100644
index 000000000..b8208e6d8
--- /dev/null
+++ b/sdk/cwl/tests/16377-missing-default.cwl
@@ -0,0 +1,28 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+cwlVersion: v1.0
+class: CommandLineTool
+requirements:
+  - class: InlineJavascriptRequirement
+  - class: ShellCommandRequirement
+arguments:
+  - cd
+  - $(inputs.hello.dirname)
+  - {shellQuote: false, valueFrom: "&&"}
+  - ls
+stdout: hello.out
+inputs:
+  hello:
+    type: File
+    default:
+      class: File
+      location: keep:ffffffffffffffffffffffffffaaaaaa+69/hello.txt
+    secondaryFiles:
+      - .idx
+outputs:
+  out:
+    type: File
+    outputBinding:
+      glob: hello.out
diff --git a/sdk/cwl/tests/arvados-tests.yml b/sdk/cwl/tests/arvados-tests.yml
index c4c096875..a46decd96 100644
--- a/sdk/cwl/tests/arvados-tests.yml
+++ b/sdk/cwl/tests/arvados-tests.yml
@@ -120,7 +120,12 @@
 
 - job: null
   output:
-    out: null
+    "out": {
+        "location": "hello.out",
+        "class": "File",
+        "checksum": "sha1$ec5d3976351abab45a483a49ce714a8430cb203a",
+        "size": 24
+    }
   tool: 13976-keepref-wf.cwl
   doc: "Test issue 13976"
 
@@ -329,3 +334,14 @@
   }
   tool: 16169-no-listing-hint.cwl
   doc: "Test cwltool:LoadListingRequirement propagation"
+
+- job: hello.yml
+  output:
+    "out": {
+        "location": "hello.out",
+        "class": "File",
+        "checksum": "sha1$ec5d3976351abab45a483a49ce714a8430cb203a",
+        "size": 24
+    }
+  tool: 16377-missing-default.cwl
+  doc: "Test issue 16377 - missing default fails even when it should be overridden by valid input"
diff --git a/sdk/cwl/tests/hello.yml b/sdk/cwl/tests/hello.yml
new file mode 100644
index 000000000..e7a324efe
--- /dev/null
+++ b/sdk/cwl/tests/hello.yml
@@ -0,0 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+hello:
+  class: File
+  location: keep:4d8a70b1e63b2aad6984e40e338e2373+69/hello.txt

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list