-
Notifications
You must be signed in to change notification settings - Fork 89
StepInput placeholder without key should resolve to $ #7
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
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
src/stepfunctions/steps/states.py
Outdated
| if isinstance(v, StepInput) and v.name and not step_output.contains(v): | ||
| return False, k | ||
| if isinstance(v, StepInput): | ||
| if v.name and not step_output.contains(v): |
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.
The proper fix should not be checking the v.name but to verify if v is the step_output.
For instance, if this is the input.
{
"ParamI": StepTwo.output()
}This will make not step_output.contains(v) to be False because StepTwo.output().contains(StepTwo.output()) == False. Because we don't want to fail the validation, we only need to check if the output itself is being passed.
| elif v.contains(placeholder): | ||
| return True | ||
| return False | ||
| return self.contains(placeholder) |
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.
You should keep the old logic here, and add a new method called __contains__ so that we can make v not in step_output work.
def __contains__(self, placeholder):
return self.contains(placeholder)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.
Apologies, I missed the dunder I've reinstated and added a new method
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
StepInput placeholder without key should resolve to $ (aws#7)
Previously using the following syntax:
"ParamI": StateTwo.output()failed withI've added a simple fix and extended the existing test cases so that
StepInputplaceholders behave similarly toExecutionInputAD