feat: propagate step outputs across steps#2745
Open
lukkaempf wants to merge 1 commit into
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
Currently, outputs defined in a test step are only available within that same step.
This PR propagates outputs across steps, so a binding set via
outputsin step N isavailable in step N+1 and beyond. This is an addition of new behavior.
Related issue
Fixes #2464
Proposed Changes
runStepnow returns the updatedTestContext(including output bindings) in addition to the stop signal.The step loop passes this context to subsequent steps, making outputs from one step available in the next.
Named return values are used so that
catch/finallydeferred blocks can also propagate their outputs —without them, deferred changes to the context would be lost before the function returns.
Story Proces
Prior to this PR, outputs were scoped to a single step — a binding set via
outputsin step N could not be referenced in step N+1.
This PR returns the updated
TestContextfromrunStepand passes it to subsequentsteps in the step loop.
After this PR, outputs from step N are available as bindings in all following steps.
Proof Manifest
Checklist
Further Comments