-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Daisy: Recursively build child workflows in NewFromFile (#1693)
Although workflow.NewFromFile's documentation says that it recursively reads subworkflows, that feature was never implemented. This PR ensures that sub workflows and included workflows are read when workflow.NewFromFile is called.
- Loading branch information
Showing
15 changed files
with
286 additions
and
72 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
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
19 changes: 19 additions & 0 deletions
19
daisy/test_data/TestNewFromFile_PopulatesVariables.child.wf.json
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,19 @@ | ||
{ | ||
"Vars": { | ||
"k1": { | ||
"Required": true, | ||
"Description": "The Ubuntu release to translate." | ||
} | ||
}, | ||
"steps": { | ||
"create-disks": { | ||
"createDisks": [ | ||
{ | ||
"SourceImage": "image-${k1}", | ||
"SizeGb": "50", | ||
"Type": "pd-ssd" | ||
} | ||
] | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
daisy/test_data/TestNewFromFile_PopulatesVariables.parent.wf.json
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 @@ | ||
{ | ||
"steps": { | ||
"include-workflow": { | ||
"IncludeWorkflow": { | ||
"path": "./TestNewFromFile_PopulatesVariables.child.wf.json", | ||
"Vars": { | ||
"k1": "v1" | ||
} | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
daisy/test_data/TestNewFromFile_ReadsChildWorkflows.child1.wf.json
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,20 @@ | ||
{ | ||
"steps": { | ||
"include-workflow": { | ||
"IncludeWorkflow": { | ||
"path": "./TestNewFromFile_ReadsChildWorkflows.child2.wf.json", | ||
"Vars": { | ||
"k3": "v3" | ||
} | ||
} | ||
}, | ||
"sub-workflow": { | ||
"SubWorkflow": { | ||
"path": "./TestNewFromFile_ReadsChildWorkflows.child2.wf.json", | ||
"Vars": { | ||
"k4": "v4" | ||
} | ||
} | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
daisy/test_data/TestNewFromFile_ReadsChildWorkflows.child2.wf.json
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 @@ | ||
{ | ||
"steps": { | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
daisy/test_data/TestNewFromFile_ReadsChildWorkflows.parent.wf.json
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,20 @@ | ||
{ | ||
"steps": { | ||
"include-workflow": { | ||
"IncludeWorkflow": { | ||
"path": "./TestNewFromFile_ReadsChildWorkflows.child1.wf.json", | ||
"Vars": { | ||
"k1": "v1" | ||
} | ||
} | ||
}, | ||
"sub-workflow": { | ||
"SubWorkflow": { | ||
"path": "./TestNewFromFile_ReadsChildWorkflows.child1.wf.json", | ||
"Vars": { | ||
"k2": "v2" | ||
} | ||
} | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
daisy/test_data/TestNewIncludedWorkflowFromFile_UsesResourcesFromParent.wf.json
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 @@ | ||
{ | ||
"steps": { | ||
} | ||
} |
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
Oops, something went wrong.