forked from broadinstitute/cromwell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow non-call-cached tasks (broadinstitute#5426)
- Loading branch information
1 parent
5545a66
commit 6d2875d
Showing
7 changed files
with
91 additions
and
0 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
12 changes: 12 additions & 0 deletions
12
centaur/src/main/resources/standardTestCases/volatile_disables_cache.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,12 @@ | ||
name: volatile_disables_cache | ||
testFormat: runtwiceexpectingnocallcaching | ||
|
||
files { | ||
workflow: volatile_disables_cache/volatile_disables_cache.wdl | ||
options: volatile_disables_cache/volatile_disables_cache.options | ||
} | ||
|
||
metadata { | ||
workflowName: volatile_disables_cache | ||
status: Succeeded | ||
} |
4 changes: 4 additions & 0 deletions
4
.../main/resources/standardTestCases/volatile_disables_cache/volatile_disables_cache.options
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,4 @@ | ||
{ | ||
"read_from_cache": true, | ||
"write_to_cache": true | ||
} |
24 changes: 24 additions & 0 deletions
24
.../src/main/resources/standardTestCases/volatile_disables_cache/volatile_disables_cache.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,24 @@ | ||
version 1.0 | ||
|
||
workflow volatile_disables_cache { | ||
call volatile_task | ||
output { | ||
Int random = volatile_task.out | ||
} | ||
} | ||
|
||
task volatile_task { | ||
meta { | ||
description: "Do something stochastic. We don't want this to call cache!" | ||
volatile: true | ||
} | ||
command <<< | ||
echo $RANDOM | ||
>>> | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
output { | ||
Int out = read_int(stdout()) | ||
} | ||
} |
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,43 @@ | ||
# The 'volatile' Optimization | ||
|
||
Available in Cromwell version 49 and higher. | ||
|
||
### Effect on Call Caching: | ||
|
||
The 'volatile' optimization is applied to tasks in their `meta` section. | ||
Call caching will be disabled for any call to that task during the execution of the workflow. | ||
|
||
This is particularly useful if: | ||
|
||
* One task can produce stochastic results but you still want to use call caching in the rest of the workflow. | ||
* You want to guarantee that a task is never call cached for any other reason. | ||
|
||
## Language Support | ||
|
||
### WDL | ||
|
||
In a WDL `task`, this optimization is specified by adding a `volatile` field to | ||
the task's `meta` section. Here's an example: | ||
|
||
```wdl | ||
version 1.0 | ||
task make_random_int { | ||
meta { | ||
volatile: true | ||
} | ||
command <<< | ||
echo $RANDOM | ||
>>> | ||
output { | ||
Int random = read_string(stdout()) | ||
} | ||
} | ||
``` | ||
|
||
## Backend Support | ||
|
||
The volatile keyword applies equally to all backends. |
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