14198: Add remote-case and twostep-both-remote
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 9 Nov 2018 20:33:05 +0000 (15:33 -0500)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Wed, 21 Nov 2018 18:05:27 +0000 (13:05 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

sdk/cwl/tests/federation/cases/remote-case.cwl [new file with mode: 0644]
sdk/cwl/tests/federation/cases/twostep-both-remote.cwl [new file with mode: 0644]
sdk/cwl/tests/federation/data/remote-case-input.txt [new file with mode: 0644]
sdk/cwl/tests/federation/data/twostep-both-remote.txt [new file with mode: 0644]
sdk/cwl/tests/federation/main.cwl

diff --git a/sdk/cwl/tests/federation/cases/remote-case.cwl b/sdk/cwl/tests/federation/cases/remote-case.cwl
new file mode 100644 (file)
index 0000000..02d1e95
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+cwlVersion: v1.0
+class: Workflow
+$namespaces:
+  arv: "http://arvados.org/cwl#"
+requirements:
+  InlineJavascriptRequirement: {}
+  DockerRequirement:
+    dockerPull: arvados/fed-test:remote-case
+inputs:
+  inp:
+    type: File
+    inputBinding: {}
+  runOnCluster: string
+outputs:
+  hash:
+    type: File
+    outputSource: md5sum/hash
+steps:
+  md5sum:
+    in:
+      inp: inp
+      runOnCluster: runOnCluster
+    out: [hash]
+    run: md5sum.cwl
\ No newline at end of file
diff --git a/sdk/cwl/tests/federation/cases/twostep-both-remote.cwl b/sdk/cwl/tests/federation/cases/twostep-both-remote.cwl
new file mode 100644 (file)
index 0000000..c6cc811
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+cwlVersion: v1.0
+class: Workflow
+$namespaces:
+  arv: "http://arvados.org/cwl#"
+requirements:
+  InlineJavascriptRequirement: {}
+  DockerRequirement:
+    dockerPull: arvados/fed-test:twostep-both-remote
+inputs:
+  inp:
+    type: File
+    inputBinding: {}
+  md5sumCluster: string
+  revCluster: string
+outputs:
+  hash:
+    type: File
+    outputSource: md5sum/hash
+steps:
+  md5sum:
+    in:
+      inp: inp
+      runOnCluster: md5sumCluster
+    out: [hash]
+    run: md5sum.cwl
+  rev:
+    in:
+      inp: md5sum/hash
+      runOnCluster: revCluster
+    out: [revhash]
+    run: rev.cwl
diff --git a/sdk/cwl/tests/federation/data/remote-case-input.txt b/sdk/cwl/tests/federation/data/remote-case-input.txt
new file mode 100644 (file)
index 0000000..21e87fb
--- /dev/null
@@ -0,0 +1,16 @@
+Call me remote-case. Some years ago--never mind how long precisely--having
+little or no money in my purse, and nothing particular to interest me on
+shore, I thought I would sail about a little and see the watery part of
+the world. It is a way I have of driving off the spleen and regulating
+the circulation. Whenever I find myself growing grim about the mouth;
+whenever it is a damp, drizzly November in my soul; whenever I find
+myself involuntarily pausing before coffin warehouses, and bringing up
+the rear of every funeral I meet; and especially whenever my hypos get
+such an upper hand of me, that it requires a strong moral principle to
+prevent me from deliberately stepping into the street, and methodically
+knocking people's hats off--then, I account it high time to get to sea
+as soon as I can. This is my substitute for pistol and ball. With a
+philosophical flourish Cato throws himself upon his sword; I quietly
+take to the ship. There is nothing surprising in this. If they but knew
+it, almost all men in their degree, some time or other, cherish very
+nearly the same feelings towards the ocean with me.
diff --git a/sdk/cwl/tests/federation/data/twostep-both-remote.txt b/sdk/cwl/tests/federation/data/twostep-both-remote.txt
new file mode 100644 (file)
index 0000000..6218bb5
--- /dev/null
@@ -0,0 +1,16 @@
+Call me twostep-both-remote. Some years ago--never mind how long precisely--having
+little or no money in my purse, and nothing particular to interest me on
+shore, I thought I would sail about a little and see the watery part of
+the world. It is a way I have of driving off the spleen and regulating
+the circulation. Whenever I find myself growing grim about the mouth;
+whenever it is a damp, drizzly November in my soul; whenever I find
+myself involuntarily pausing before coffin warehouses, and bringing up
+the rear of every funeral I meet; and especially whenever my hypos get
+such an upper hand of me, that it requires a strong moral principle to
+prevent me from deliberately stepping into the street, and methodically
+knocking people's hats off--then, I account it high time to get to sea
+as soon as I can. This is my substitute for pistol and ball. With a
+philosophical flourish Cato throws himself upon his sword; I quietly
+take to the ship. There is nothing surprising in this. If they but knew
+it, almost all men in their degree, some time or other, cherish very
+nearly the same feelings towards the ocean with me.
index 602cc2fcb70d4ecbc6e45879a585b6bc727412c9..4b95d8c03d53075c3f48af89a4f210d0bff00f6f 100755 (executable)
@@ -39,13 +39,16 @@ outputs:
   runner-remote-step-home-success:
     type: Any
     outputSource: runner-remote-step-home/success
+  remote-case-success:
+    type: Any
+    outputSource: remote-case/success
   twostep-home-to-remote-success:
     type: Any
     outputSource: twostep-home-to-remote/success
   twostep-remote-to-home-success:
     type: Any
     outputSource: twostep-remote-to-home/success
-  twostep-both-remote:
+  twostep-both-remote-success:
     type: Any
     outputSource: twostep-both-remote/success
 
@@ -151,6 +154,40 @@ steps:
     out: [out, success]
     run: framework/testcase.cwl
 
+  remote-case:
+    in:
+      arvados_api_token: arvados_api_token
+      arvado_api_host_insecure: arvado_api_host_insecure
+      arvados_api_hosts: arvados_api_hosts
+      arvados_cluster_ids: arvados_cluster_ids
+      acr: acr
+      wf:
+        default:
+          class: File
+          location: cases/remote-case.cwl
+          secondaryFiles:
+            - class: File
+              location: cases/md5sum.cwl
+      obj:
+        default:
+          inp:
+            class: File
+            location: data/remote-case-input.txt
+        valueFrom: |-
+          ${
+          self["runOnCluster"] = inputs.arvados_cluster_ids[1];
+          return self;
+          }
+      runner_cluster: { valueFrom: "$(inputs.arvados_cluster_ids[1])" }
+      scrub_image: {default: "arvados/fed-test:remote-case"}
+      scrub_collections:
+        default:
+          - 031a4ced0aa99de90fb630568afc6e9b+67   # input collection
+          - eb93a6718eb1a1a8ee9f66ee7d683472+51   # md5sum output collection
+          - f654d4048612135f4a5e7707ec0fcf3e+112  # final output json
+    out: [out, success]
+    run: framework/testcase.cwl
+
   twostep-home-to-remote:
     in:
       arvados_api_token: arvados_api_token
@@ -264,5 +301,3 @@ steps:
           - ddfa58a81953dad08436d571615dd584+112  # runner output json
     out: [out, success]
     run: framework/testcase.cwl
-
-  # also: twostep-all-remote