-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
stepfunctions: Retry block in CustomState is always empty. #28586
stepfunctions: Retry block in CustomState is always empty. #28586
Comments
Currently it is not possible to set Retry for the Task when using CustomState construct. There are two ways to add Retry: by adding the `addRetry` method or by rendering the `Retry` property of `stateJson`. The `addRetry` method was added in this PR because rendering the `Retry` property of `stateJson`, which was not rendered before, could result in an unexpected StateMachine for the user. Closes #28586 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Hey @pahud, Can the issue be re-opened. #28598 only satisfies bullet 2 in the I don't believe the actual regression (bullet 1) has been addressed. Users upgrading from EDIT: Creating separate issue as suggested by the bot |
…is always overwrited (#28793) After #28422 was merged, the regression that overwrites the Retry field defined in the stateJson was introduced. The `this.renderRetryCatch()` method overwrites the Retry field in the stateJson. https://github.com/aws/aws-cdk/blob/45b8398bec9ba9c03f195c14f3b92188c9058a7b/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts#L74 This PR fixes this regression and clarifies the current behavior for configuring the Retry and Catch field. Previously, I added the `addRetry` method to add the Retry field and did not render the Retry field in the stateJson in #28598, but this is initially a regression and should have been fixed. Closes #28769 Relates #28586 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…is always overwrited (#28793) After #28422 was merged, the regression that overwrites the Retry field defined in the stateJson was introduced. The `this.renderRetryCatch()` method overwrites the Retry field in the stateJson. https://github.com/aws/aws-cdk/blob/45b8398bec9ba9c03f195c14f3b92188c9058a7b/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts#L74 This PR fixes this regression and clarifies the current behavior for configuring the Retry and Catch field. Previously, I added the `addRetry` method to add the Retry field and did not render the Retry field in the stateJson in #28598, but this is initially a regression and should have been fixed. Closes #28769 Relates #28586 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…is always overwrited (#28793) After #28422 was merged, the regression that overwrites the Retry field defined in the stateJson was introduced. The `this.renderRetryCatch()` method overwrites the Retry field in the stateJson. https://github.com/aws/aws-cdk/blob/45b8398bec9ba9c03f195c14f3b92188c9058a7b/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts#L74 This PR fixes this regression and clarifies the current behavior for configuring the Retry and Catch field. Previously, I added the `addRetry` method to add the Retry field and did not render the Retry field in the stateJson in #28598, but this is initially a regression and should have been fixed. Closes #28769 Relates #28586 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
After this(#28422) changes, Retry block in CustomState is always empty.
because Retry is always overwritten here.
https://github.com/graydenshand/aws-cdk/blob/3e7c777f28d3375acdb6bf1446c2cd159eadce6d/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts#L56-L65
Expected Behavior
Current Behavior
Retry is always overwrite by empty array.
Reproduction Steps
Pass stateJson that has Retry lock to CustomState.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.116.0
Framework Version
No response
Node.js Version
18.15.0
OS
macOS Sonoma 14.2.1
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: