-
Notifications
You must be signed in to change notification settings - Fork 149
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
Daisy: Recursively build child workflows in NewFromFile #1693
Daisy: Recursively build child workflows in NewFromFile #1693
Conversation
428232e
to
53eb9d7
Compare
Pausing review for a bit; while running some tests, OVF import is failing with |
dd8c156
to
2ea3ac8
Compare
Re-opening: Fixed the "Unresolved var" error, added unit test to verify it, and ran additional e2e tests locally. |
2ea3ac8
to
f050633
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dntczdx, EricEdens, zoran15 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…sn't have variable. (#1701) This adds support for recursively reading child workflows. The feature was first added in #1693, but rolled back in #1700 due to a bug that it introduced. The issue: Variable instantiate occurs during populate, and callers expect that behavior. Callers also expect to define child workflow names using variables. Those are in conflict if we want to read child workflows before populate. To address this, I added a fix in eacb97a where child workflows are eagerly read only when they're fully specified. If the filename contains a variable, then the legacy behavior of reading the workflow during the step's populate is retained.
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 whenworkflow.NewFromFile
is called.To avoid double reading child workflow files, it also adds a guard in the respective
populate
methods.