-
Notifications
You must be signed in to change notification settings - Fork 375
AN-732 WDL 1.1 localizationOptional support
#7823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eca3d1b
`runtime.localizationOptional` support
aednichols 88ab344
Clean up incidental PAPIv1 find
aednichols dc0b1fe
`scalafmtAll`
aednichols d499a4b
README
aednichols 1861681
This test is not very important anyway
aednichols 4895da7
Merge remote-tracking branch 'origin/develop' into aen_an_732
aednichols db0db59
Elevate function to highest shared scope
aednichols d04e5b7
AWS comment
aednichols File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
11 changes: 11 additions & 0 deletions
11
centaur/src/main/resources/standardTestCases/input_hint/README.txt
This file contains hidden or 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 @@ | ||
| Per the 1.1 spec, | ||
|
|
||
| "Provides input-specific hints in the form of an object. Each key within this | ||
| hint should refer to an actual input defined for the current task. A key may | ||
| also refer to a specific member of a struct/object input." | ||
|
|
||
| Currently, `localizationOptional` is the only hint Cromwell supports. | ||
|
|
||
| https://github.com/openwdl/wdl/blob/wdl-1.1/SPEC.md#reserved-runtime-hints | ||
| https://github.com/openwdl/wdl/blob/wdl-1.1/SPEC.md#localizationoptional | ||
| https://github.com/openwdl/wdl/blob/wdl-1.1/SPEC.md#inputs |
4 changes: 4 additions & 0 deletions
4
centaur/src/main/resources/standardTestCases/input_hint/input_hint_all_optional.json
This file contains hidden or 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 @@ | ||
| { | ||
| "input_hint_wf.foo": "gs://centaur-ci/textfile_1.txt", | ||
| "input_hint_wf.bar": ["gs://centaur-ci/textfile_2.txt", "gs://centaur-ci/textfile_3.txt"] | ||
| } |
13 changes: 13 additions & 0 deletions
13
centaur/src/main/resources/standardTestCases/input_hint/input_hint_all_optional.test
This file contains hidden or 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: input_hint_all_optional | ||
| testFormat: workflowsuccess | ||
| backends: [GCPBATCH] | ||
|
|
||
| files { | ||
| workflow: input_hint_all_optional.wdl | ||
| inputs: input_hint_all_optional.json | ||
| } | ||
|
|
||
| metadata { | ||
| status: Succeeded | ||
| "outputs.input_hint_wf.errors": "" | ||
| } |
56 changes: 56 additions & 0 deletions
56
centaur/src/main/resources/standardTestCases/input_hint/input_hint_all_optional.wdl
This file contains hidden or 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,56 @@ | ||
| version development-1.1 | ||
|
|
||
| # Adapted from https://github.com/openwdl/wdl/blob/wdl-1.1/SPEC.md#reserved-runtime-hints | ||
|
|
||
| task localization_tester { | ||
| input { | ||
| File foo | ||
| Array[File] bar | ||
| } | ||
|
|
||
| # Require that the file is NOT localized, adapted from `draft3_nio_file_papi2.wdl` | ||
| command <<< | ||
| touch errors.txt | ||
| ls | ||
|
|
||
| # Check filenames are correct | ||
| [ ~{foo} = "gs://centaur-ci/textfile_1.txt" ] || echo "Wrong filename ~{foo}" >> errors.txt | ||
| [ ~{bar[0]} = "gs://centaur-ci/textfile_2.txt" ] || echo "Wrong filename ~{bar[0]}" >> errors.txt | ||
| [ ~{bar[1]} = "gs://centaur-ci/textfile_3.txt" ] || echo "Wrong filename ~{bar[1]}" >> errors.txt | ||
|
|
||
| # Check files are not localized | ||
| find . -path "*centaur-ci/textfile_1.txt" >> errors.txt | ||
| find . -path "*centaur-ci/textfile_2.txt" >> errors.txt | ||
| find . -path "*centaur-ci/textfile_3.txt" >> errors.txt | ||
| >>> | ||
|
|
||
| output { | ||
| String errors = read_string("errors.txt") | ||
| } | ||
|
|
||
| runtime { | ||
| localizationOptional: true | ||
| container: "rockylinux/rockylinux:10-minimal" | ||
| predefinedMachineType: "e2-medium" | ||
| } | ||
|
|
||
| meta { | ||
| volatile: true | ||
| } | ||
| } | ||
|
|
||
| workflow input_hint_wf { | ||
|
|
||
| input { | ||
| File foo | ||
| Array[File] bar | ||
| } | ||
|
|
||
| call localization_tester { | ||
| input: foo, bar | ||
| } | ||
|
|
||
| output { | ||
| String errors = localization_tester.errors | ||
| } | ||
| } |
145 changes: 0 additions & 145 deletions
145
...src/main/resources/standardTestCases/wdl_draft3/draft3_nio_file/draft3_nio_file_papi1.wdl
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth a ticket in the CTM board? This might be a good onboarding ticket for a future dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm going to do this in the next PR, it's too small to document and re-explain later.