Parameterized cirrus workflows and task-batch-compute #105
+474
−77
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.
This change introduces user-defined templating for the following cirrus input configurations:
The intention is to allow abstracting any environment-specific values out of these files and into input variables to maintain a single YAML/JSON that can be used across all environments. This brings the
workflow
andtask-batch-compute
modules in line with how thetask
module already handles definition YAMs.In addition to general variable abstraction, these changes also enable a few handy features:
role_statements
attribute in their definition YAMLs.Breaking Change
With the introduction of user-defined template variables in workflow state machine JSONs, there was a new risk of the user's template variables potentially clashing with the names of the builtin task attribute variables. To prevent this, the builtin task attribute variables are now namespaced under a
tasks.
prefix, and the user's template variables are validated to ensure this reserved key is not used.To account for this change, you will need to modify any existing task output references in your state machine JSONs, such as
${mytask.foo.bar}
, to be${tasks.mytask.foo.bar}
instead.Here's an example updated state machine that uses both lambda and batch cirrus tasks:
This namespace also makes the source of these attribute lookups clearer.
Related issue(s)
Proposed Changes
Testing
This change was validated by the following observations:
Checklist