-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(stepfunctions): task and heartbeat timeout specified by a path #23755
Conversation
Add support for dynamic timeouts referenced by a path in the state.
private readonly credentials?: Credentials; | ||
|
||
constructor(scope: Construct, id: string, props: TaskStateBaseProps) { | ||
super(scope, id, props); | ||
|
||
if (props.timeout && props.timeoutSecondsPath) { |
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.
Let's avoid mutually exclusive props here. I'm thinking that we should deprecate the original props and do something here along the lines of the Schedule class.
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.
What should be the name of the new prop?
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.
Does taskTimeout
and heartbeatTimeout
make sense? Totally open to better ideas.
Pull request has been modified.
@@ -3,6 +3,7 @@ import { Linter } from '../linter'; | |||
|
|||
const DURATION_FQN = '@aws-cdk/core.Duration'; | |||
const DURATION_SUFFIX = /(Days|Milli(?:(?:S|s)econd)?s?|Sec(?:ond)?s?)$/; | |||
const EXCLUDE_ANNOTATION_DURATION_PROP_TYPE = '[disable-awslint:duration-prop-type]'; |
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.
Had to create this to avoid those errors for all props interfaces that extend TaskStateBaseProps
. I think this is a better solution than adding all the exclusions in the package.json
in aws-stepfunctions-tasks
.
Build errors awslint:duration-prop-type
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaGetQueryExecutionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaGetQueryExecutionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaGetQueryResultsProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaGetQueryResultsProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaStartQueryExecutionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaStartQueryExecutionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaStopQueryExecutionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.AthenaStopQueryExecutionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayEndpointBaseProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayEndpointBaseProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayHttpApiEndpointProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayHttpApiEndpointProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayRestApiEndpointProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayRestApiEndpointProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallAwsServiceProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CallAwsServiceProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CodeBuildStartBuildProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.CodeBuildStartBuildProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoDeleteItemProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoDeleteItemProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoGetItemProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoGetItemProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoPutItemProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoPutItemProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoUpdateItemProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.DynamoUpdateItemProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EcsRunTaskProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EcsRunTaskProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EksCallProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EksCallProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrAddStepProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrAddStepProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrCancelStepProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrCancelStepProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersCreateVirtualClusterProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersCreateVirtualClusterProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersDeleteVirtualClusterProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersDeleteVirtualClusterProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersStartJobRunProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrContainersStartJobRunProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrCreateClusterProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrCreateClusterProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrModifyInstanceFleetByNameProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrModifyInstanceFleetByNameProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrModifyInstanceGroupByNameProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrModifyInstanceGroupByNameProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrSetClusterTerminationProtectionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrSetClusterTerminationProtectionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrTerminateClusterProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EmrTerminateClusterProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EvaluateExpressionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EvaluateExpressionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EventBridgePutEventsProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.EventBridgePutEventsProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.GlueDataBrewStartJobRunProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.GlueDataBrewStartJobRunProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.GlueStartJobRunProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.GlueStartJobRunProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.LambdaInvokeProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.LambdaInvokeProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateEndpointConfigProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateEndpointConfigProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateEndpointProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateEndpointProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateModelProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateModelProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateTrainingJobProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateTrainingJobProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateTransformJobProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerCreateTransformJobProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerUpdateEndpointProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SageMakerUpdateEndpointProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SnsPublishProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SnsPublishProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SqsSendMessageProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.SqsSendMessageProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.StepFunctionsInvokeActivityProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.StepFunctionsInvokeActivityProps.taskTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.StepFunctionsStartExecutionProps.heartbeatTimeout] property must be typed @aws-cdk/core.Duration
@aws-cdk/aws-stepfunctions-tasks: error: [awslint:duration-prop-type:@aws-cdk/aws-stepfunctions-tasks.StepFunctionsStartExecutionProps.taskTimeout] property must be typed @aws-cdk/core.Duration
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.
Looks good!
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Add support for dynamic timeouts referenced by a path in the state.
Closes #15531
All Submissions:
Adding new Construct Runtime Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license