-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Imperfect retries for GCS requests * Include OGINs for if and scatter expressions in GraphNode accumulation * Readable error message for invalid indexing * Fixup coercion into the WomNonEmptyArrayType * Power through non-findable terminals in error messages * Allow 0 shard scatters * Show optional inputs in womtool (#3050) * Use call IO functions for evaluating runtime attributes * Allow member accesses to parse * Unstuck workflows and GCS retries
- Loading branch information
1 parent
70eb8ee
commit 047d48f
Showing
71 changed files
with
932 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
...t/scala/centaur/RestartTestCaseSpec.scala → ...cala/centaur/SequentialTestCaseSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package centaur | ||
|
||
import centaur.test.standard.CentaurTestFormat.RestartFormat | ||
import org.scalatest.{DoNotDiscover, Matchers} | ||
|
||
/** | ||
* All test cases that trigger a Cromwell restart. Note that this suite does not mix in ParallelTestExecution | ||
* such that the restarting tests execute sequentially to avoid a mayhem of Cromwell restarts | ||
*/ | ||
@DoNotDiscover | ||
class RestartTestCaseSpec(cromwellBackends: List[String]) extends AbstractCentaurTestCaseSpec(cromwellBackends) with Matchers { | ||
class SequentialTestCaseSpec(cromwellBackends: List[String]) extends AbstractCentaurTestCaseSpec(cromwellBackends) with Matchers { | ||
|
||
def this() = this(CentaurTestSuite.cromwellBackends) | ||
|
||
allTestCases.filter( _.testFormat match { | ||
case _: RestartFormat => true | ||
case _ => false | ||
} | ||
) foreach executeStandardTest | ||
allTestCases.filter(CentaurTestSuite.runSequential) foreach executeStandardTest | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
package centaur | ||
|
||
import centaur.test.standard.CentaurTestFormat.RestartFormat | ||
import org.scalatest._ | ||
|
||
@DoNotDiscover | ||
class StandardTestCaseSpec(cromwellBackends: List[String]) extends AbstractCentaurTestCaseSpec(cromwellBackends) with ParallelTestExecution { | ||
|
||
def this() = this(CentaurTestSuite.cromwellBackends) | ||
|
||
allTestCases.filter( _.testFormat match { | ||
case _: RestartFormat => false | ||
case _ => true | ||
} | ||
) foreach executeStandardTest | ||
|
||
allTestCases.filter(CentaurTestSuite.runParallel) foreach executeStandardTest | ||
} |
38 changes: 38 additions & 0 deletions
38
centaur/src/main/resources/standardTestCases/chain_fail/chain_fail.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import "chain_fail_import.wdl" as sub | ||
|
||
workflow chain_fail { | ||
call fail | ||
|
||
Array[Boolean] is = [ fail.o ] | ||
|
||
# This scatter will never be runnable because the fail task will... fail | ||
scatter (j in is) { | ||
call fail as scatter_fail | ||
} | ||
|
||
if (fail.o) { | ||
call fail as conditional_fail | ||
} | ||
|
||
call sub.wf_hello { input: wf_hello_input = fail.o } | ||
|
||
output { | ||
Array[Boolean] scatter_o = scatter_fail.o | ||
Boolean? conditional_o = conditional_fail.o | ||
String sub_workflow_o = wf_hello.salutation | ||
} | ||
} | ||
|
||
|
||
task fail { | ||
command { | ||
echo false | ||
exit 1 | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
output { | ||
Boolean o = read_boolean(stdout()) | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
centaur/src/main/resources/standardTestCases/chain_fail/chain_fail_import.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
task hello { | ||
Boolean addressee | ||
command { | ||
echo "Hello ${addressee}!" | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
output { | ||
String salutation = read_string(stdout()) | ||
} | ||
} | ||
|
||
workflow wf_hello { | ||
Boolean wf_hello_input = true | ||
|
||
call hello { input: addressee = wf_hello_input } | ||
|
||
output { | ||
String salutation = hello.salutation | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
centaur/src/main/resources/standardTestCases/chainfail.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Test that if a scatter / conditional / sub workflow depends on *something* that fails, | ||
# the workflow fails properly even if later nodes depend on the scatter / conditional / sub workflow. | ||
name: chainfail | ||
testFormat: workflowfailure | ||
|
||
files { | ||
wdl: chain_fail/chain_fail.wdl | ||
imports: [ | ||
chain_fail/chain_fail_import.wdl | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
centaur/src/main/resources/standardTestCases/empty_scatter.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: empty_scatter | ||
testFormat: workflowsuccess | ||
|
||
files { | ||
wdl: empty_scatter/empty_scatter.wdl | ||
} | ||
|
||
metadata { | ||
workflowName: empty_scatter | ||
status: Succeeded | ||
"outputs.empty_scatter.task_outs_length" : "0" | ||
"outputs.empty_scatter.decls_length" : "0" | ||
} |
28 changes: 28 additions & 0 deletions
28
centaur/src/main/resources/standardTestCases/empty_scatter/empty_scatter.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
workflow empty_scatter { | ||
Array[Int] xs = [] | ||
|
||
scatter (x in xs) { | ||
Int decl = 75 + x | ||
call do_nothing { input: whoa = decl } | ||
} | ||
|
||
output { | ||
Int task_outs_length = length(do_nothing.str) | ||
Int decls_length = length(decl) | ||
} | ||
} | ||
|
||
# We should never invoke this since we're scattering over an empty array | ||
task do_nothing { | ||
Int whoa | ||
command { | ||
# doesn't matter, won't be run anyway: | ||
exit 500 | ||
} | ||
output { | ||
String str = "str" | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
centaur/src/main/resources/standardTestCases/object_access.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: object_access | ||
testFormat: workflowsuccess | ||
|
||
files { | ||
wdl: object_access/object_access.wdl | ||
} | ||
|
||
metadata { | ||
workflowName: object_access | ||
status: Succeeded | ||
"outputs.object_access.lines.0": "1", | ||
"outputs.object_access.lines.1": "2", | ||
"outputs.object_access.lines.2": "3", | ||
"outputs.object_access.int_a": "1", | ||
"outputs.object_access.int_b": "2", | ||
} |
55 changes: 55 additions & 0 deletions
55
centaur/src/main/resources/standardTestCases/object_access/object_access.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
workflow object_access { | ||
call mk_object | ||
call use_object { input: obj_in = mk_object.out } | ||
call use_field as get_a { input: int_in = mk_object.out.a } | ||
|
||
Object temp = mk_object.out | ||
call use_field as get_b { input: int_in = temp.b } | ||
|
||
output { | ||
Array[String] lines = use_object.lines | ||
Int int_a = get_a.int_out | ||
Int int_b = get_b.int_out | ||
} | ||
} | ||
|
||
task mk_object { | ||
command { | ||
echo -e "a\tb\tc" | ||
echo -e "1\t2\t3" | ||
} | ||
output { | ||
Object out = read_object(stdout()) | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} | ||
|
||
task use_object { | ||
Object obj_in | ||
command { | ||
echo ${obj_in.a} | ||
echo ${obj_in.b} | ||
echo ${obj_in.c} | ||
} | ||
output { | ||
Array[String] lines = read_lines(stdout()) | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} | ||
|
||
task use_field { | ||
Int int_in | ||
command { | ||
echo ${int_in} | ||
} | ||
output { | ||
Int int_out = read_int(stdout()) | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 20 additions & 4 deletions
24
...sources/standardTestCases/runtime_attribute_expressions/runtime_attribute_expressions.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
|
||
task expression { | ||
String version | ||
File memory_sizer | ||
|
||
command { | ||
echo "Hello world!" | ||
echo "Hello World" | ||
} | ||
|
||
output { | ||
String out = stdout() | ||
String out = read_string(stdout()) | ||
} | ||
|
||
runtime { | ||
# Not a literal WdlString | ||
docker: "ubuntu:" + version | ||
|
||
# Uses IO functions to evaluate the 'size': | ||
memory: ceil(size(memory_sizer)) + "GB" | ||
} | ||
} | ||
|
||
task make_2_byte_file { | ||
command { | ||
# One byte comes from the newline: | ||
echo "a" > ab.txt | ||
} | ||
output { | ||
File f = "ab.txt" | ||
} | ||
runtime { docker: "ubuntu:latest" } | ||
} | ||
|
||
workflow runtime_attribute_expressions { | ||
|
||
call expression { input: version="latest" } | ||
call make_2_byte_file | ||
call expression { input: version="latest", memory_sizer = make_2_byte_file.f } | ||
|
||
output { | ||
expression.out | ||
String out = expression.out | ||
} | ||
} |
Oops, something went wrong.