[ARVADOS] updated: 1.3.0-2741-gf344802c8

Git user git at public.arvados.org
Mon Jun 29 19:54:19 UTC 2020


Summary of changes:
 sdk/cwl/arvados_cwl/runner.py                                    | 2 ++
 sdk/cwl/tests/arvados-tests.yml                                  | 9 ++++++++-
 sdk/cwl/tests/wf-defaults/default-dir4.cwl                       | 2 +-
 sdk/cwl/tests/wf-defaults/{default-dir4.cwl => default-dir8.cwl} | 0
 sdk/cwl/tests/wf-defaults/wf4.cwl                                | 2 +-
 sdk/cwl/tests/wf-defaults/{wf4.cwl => wf8.cwl}                   | 2 +-
 6 files changed, 13 insertions(+), 4 deletions(-)
 copy sdk/cwl/tests/wf-defaults/{default-dir4.cwl => default-dir8.cwl} (100%)
 copy sdk/cwl/tests/wf-defaults/{wf4.cwl => wf8.cwl} (91%)

       via  f344802c8ec0d1e56151d69a25fa16da35788800 (commit)
      from  8921a4561cf42d0d44a3676683a9be2b851aad2e (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 f344802c8ec0d1e56151d69a25fa16da35788800
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Mon Jun 29 14:55:55 2020 -0400

    Restore check for 'id' field for CWL v1.0 only
    
    On further research, I realized why the check for 'id' on embedded
    process objects was in place (to catch potential id conflicts earlier
    instead of later), however the underlying problem is resolved in cwl
    1.1+
    
    refs #16382
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index a47b34acc..71e499ebc 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -460,6 +460,8 @@ def packed_workflow(arvrunner, tool, merged_map):
     def visit(v, cur_id):
         if isinstance(v, dict):
             if v.get("class") in ("CommandLineTool", "Workflow"):
+                if tool.metadata["cwlVersion"] == "v1.0" and "id" not in v:
+                    raise SourceLine(v, None, Exception).makeError("Embedded process object is missing required 'id' field, add an 'id' or use to cwlVersion: v1.1")
                 if "id" in v:
                     cur_id = rewrite_to_orig.get(v["id"], v["id"])
             if "path" in v and "location" not in v:
diff --git a/sdk/cwl/tests/arvados-tests.yml b/sdk/cwl/tests/arvados-tests.yml
index 786dc643c..c4c096875 100644
--- a/sdk/cwl/tests/arvados-tests.yml
+++ b/sdk/cwl/tests/arvados-tests.yml
@@ -218,7 +218,14 @@
   output:
     out: null
   tool: wf-defaults/wf4.cwl
-  doc: default in embedded subworkflow missing 'id' field
+  doc: default in embedded subworkflow missing 'id' field, v1.0
+  should_fail: true
+
+- job: null
+  output:
+    out: null
+  tool: wf-defaults/wf8.cwl
+  doc: default in embedded subworkflow missing 'id' field, v1.1
   should_fail: false
 
 - job: null
diff --git a/sdk/cwl/tests/wf-defaults/default-dir4.cwl b/sdk/cwl/tests/wf-defaults/default-dir4.cwl
index a5b9c2f3e..bd9278248 100644
--- a/sdk/cwl/tests/wf-defaults/default-dir4.cwl
+++ b/sdk/cwl/tests/wf-defaults/default-dir4.cwl
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-cwlVersion: v1.1
+cwlVersion: v1.0
 class: Workflow
 inputs: []
 outputs: []
diff --git a/sdk/cwl/tests/wf-defaults/default-dir4.cwl b/sdk/cwl/tests/wf-defaults/default-dir8.cwl
similarity index 100%
copy from sdk/cwl/tests/wf-defaults/default-dir4.cwl
copy to sdk/cwl/tests/wf-defaults/default-dir8.cwl
diff --git a/sdk/cwl/tests/wf-defaults/wf4.cwl b/sdk/cwl/tests/wf-defaults/wf4.cwl
index 27abea290..3f498fdff 100644
--- a/sdk/cwl/tests/wf-defaults/wf4.cwl
+++ b/sdk/cwl/tests/wf-defaults/wf4.cwl
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-cwlVersion: v1.1
+cwlVersion: v1.0
 class: Workflow
 inputs: []
 outputs: []
diff --git a/sdk/cwl/tests/wf-defaults/wf4.cwl b/sdk/cwl/tests/wf-defaults/wf8.cwl
similarity index 91%
copy from sdk/cwl/tests/wf-defaults/wf4.cwl
copy to sdk/cwl/tests/wf-defaults/wf8.cwl
index 27abea290..2548faec1 100644
--- a/sdk/cwl/tests/wf-defaults/wf4.cwl
+++ b/sdk/cwl/tests/wf-defaults/wf8.cwl
@@ -14,4 +14,4 @@ steps:
   step1:
     in: []
     out: []
-    run: default-dir4.cwl
+    run: default-dir8.cwl

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list