Execute bundle from a pre-computed Run #2722
Closed
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.
What does this change
Update our CNAB runtime implementation to accept a pre-computed Run, which may have already been persisted in a pending state. We now execute it as defined and have moved more of the logic for how the bundle should be executed out of the runtime. This allows us to generate the runs ahead of time, store them on a workflow, and execute later.
What issue does it fix
Closes #2732
Notes for the reviewer
I have carved out in the runtime where we should do JIT resolution of parameters and credentials. Credentials have always been resolved JIT, but parameters are still being resolved earlier. The rest of the fix will come in a follow-up PR for #2698
I am moving away from using intermediate representations of resolved credentials and parameters in favor of using the existing field on parameter/credential sets that store the resolved value. In a follow-up PR (this was too big to include), I complete the switch over so that we delay resolution as much as possible and avoid excessive type conversions from string to the typed value (e.g. "3" -> 3).
Checklist
Reviewer Checklist