- Notifications
You must be signed in to change notification settings - Fork89
Add support for Amazon States Language "ResultSelector" in Task, Map …#102
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…and Parallel States.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
milesgranger commentedAug 31, 2021
Any update with this? Would be fantastic to have! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nice work@yoodan93 !!
overall approach looks good. had some minor/naive questions.
I do think we can raise the bar on testing a bit more though
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Taking over to help merge@yoodan93 's PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
can you also add some details around testing - i.e.
- have we tried generating a workflow and executing the state machine successfully?
at some point we should probably add some basic integ tests that exercise state machines and their support for ASL features. Presumably, we'll be adding more capabilities in the future. Probably not in scope for this PR, but worth thinking about sooner than later.
Added manual test details
Agreed! let's do add integ tests in another PR |
Requested changes have been addressed in the last commits
This is very unspecific. Can you share the SDK code you used to generate that? |
Uh oh!
There was an error while loading.Please reload this page.
| comment (str, optional): Human-readable comment or description. (default: None) | ||
| input_path (str, optional): Path applied to the state’s raw input to select some or all of it; that selection is used by the state. (default: '$') | ||
| parameters (dict, optional): The value of this field becomes the effective input for the state. | ||
| result_selector (dict, optional): The value of this field becomes the effective result of the state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Maintaining these docstrings for every inheriting class is pretty annoying. I wonder if there anything we can do to make that easier.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| Step Result | ||
| ----------- | ||
| The third mechanism is a placeholder for a step's result. The result of a step can be modified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Still wondering if it's really necessary to introduce StepResult when StepInput could also be used to achieve the same thing. I left that comment earlier but it didn't get an answer. Literally the only difference is the class name. Thoughts@shivlaks?
We can always add classes later, but removing it afterwards breaks back-compat.
lambda_result=StepInput(schema={"Id":str, })lambda_state_first=LambdaStep(state_id="MyFirstLambdaStep",result_selector={"Output":lambda_result["Id"],"Status":"Success" })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good question - I missed that comment earlier
While it does make sense to use the same object, I think the nameStepInput could bring confusion since, in this case, we are not using the step's input, but the step's result (or output)
To be backwards compatible, we can't renameStepInput to a more general term. Alternatively, we could makeStepResult inherit fromStepInput instead ofPlaceholder and avoid code duplication.
Agreed - this is not sufficient information to reproduce the test. I provided more details in theTesting section of the PR description |
AWS CodeBuild CI Report
Powered bygithub-codebuild-logs, available on theAWS Serverless Application Repository |
alesageProovStation commentedJun 19, 2023
Hi! Any plans on merging this PR soon? I'm writing a stepfunction state machine which requires this... Thanks. |
Uh oh!
There was an error while loading.Please reload this page.
Add ResultSelector support for Task, Map and Parallel states.
Issue #, if available:
#95
Description of changes
Adding new Amazon States Language payload template "ResultSelector"https://states-language.net/#payload-template
This change allows user to define a
result_selectorwhich is used to define the effective result of a state.Testing
Workflow definition:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.