stepfunctions: Retry block in CustomState is always empty. #28586
Closed
Description
Describe the bug
After this(#28422) changes, Retry block in CustomState is always empty.
because Retry is always overwritten here.
Expected Behavior
- The Retry block passed to the constructor will be used as is.
- or add addRetry method.
Current Behavior
Retry is always overwrite by empty array.
Reproduction Steps
Pass stateJson that has Retry lock to CustomState.
const stateJson = {
Type: "Task",
Resource: "arn:aws:states:::ecs:runTask.sync",
ResultPath: "$.results.ECSRunTask",
TimeoutSeconds: defaultTimeoutHours * 60 * 60,
Retry: [
{
ErrorEquals: ["ECS.AmazonECSException", "ECS.ServerException"],
IntervalSeconds: 60,
MaxAttempts: 3,
},
],
Parameters: {
LaunchType: "FARGATE",
Group: ecsServiceName,
Cluster: clusterArn,
TaskDefinition: taskDefinitionArn,
},
};
const RunTaskState = new sfn.CustomState(this, "ECS RunTask.", {
stateJson: stateJson,
});
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