-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(stepfunctions): allow JSONata expressions for Map maxConcurrency #36462
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
base: main
Are you sure you want to change the base?
Conversation
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.
(This review is outdated)
|
@mu7889yoon Thank you for your contirbution. If you have any problem to execute integ test, please read this document (in Japanese!). https://jaws-ug-cdk.github.io/cdk-conf-2024-contribute-workshop/ |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Thank you for your contribution! I've added some minor comments.
...-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.map-jsonata-maxconcurrency.ts
Outdated
Show resolved
Hide resolved
badmintoncryer
left a comment
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.
Thanks! I've added a tiny comment. After your modification, I'll approve this PR.
Co-authored-by: Kazuho Cryer-Shinozuka <[email protected]>
badmintoncryer
left a comment
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.
Thanks!
Thank you for your review !! |
Issue # (if applicable)
Closes #36274
Reason for this change
In the current implementation, the Map state's maxConcurrency property only accepts numeric values.
However, according to the Amazon States Language specification, maxConcurrency can also be defined using a JSONata expression.
This limitation prevents users from dynamically controlling concurrency based on input data and causes a mismatch between CDK and the underlying Step Functions / CloudFormation capabilities.
This change updates the implementation to allow JSONata expressions for Map maxConcurrency, aligning CDK behavior with the Step Functions specification.
Description of changes
This PR updates the Map state to support JSONata expressions for the maxConcurrency property.
A new option is introduced to allow maxConcurrency to be specified as a JSONata expression, in addition to a static numeric value.
This option is mutually exclusive with the existing numeric maxConcurrency configuration.
During synthesis, when a JSONata expression is provided, it is rendered directly into the CloudFormation template as the Map state's maxConcurrency value.
An alternative approach, such as introducing a new class or restructuring the existing API, was considered.
However, this was avoided to prevent breaking changes for existing users.
Describe any new or updated permissions being added
None
Description of how you validated changes
Added unit test and an integration test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license