Skip to content

Commit

Permalink
fix: retry schema-migration sfn on Batch.AWSBatchException (#7165)
Browse files Browse the repository at this point in the history
Co-authored-by: nayib-jose-gloria <[email protected]>
  • Loading branch information
Bento007 and nayib-jose-gloria authored Jun 6, 2024
1 parent df9b3e5 commit a6c5645
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .happy/terraform/modules/schema_migration/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ resource aws_sfn_state_machine sfn_schema_migration {
},
"Next": "SpanCollections",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -303,7 +303,7 @@ resource aws_sfn_state_machine sfn_schema_migration {
},
"Next": "DatasetsExists",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -366,7 +366,7 @@ resource aws_sfn_state_machine sfn_schema_migration {
},
"End": true,
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -439,7 +439,7 @@ resource aws_sfn_state_machine sfn_schema_migration {
},
"Next": "StepFunctionsStartExecution",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -578,7 +578,7 @@ resource aws_sfn_state_machine sfn_schema_migration {
}
},
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down
14 changes: 7 additions & 7 deletions .happy/terraform/modules/sfn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resource "aws_sfn_state_machine" "state_machine" {
}
],
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -144,7 +144,7 @@ resource "aws_sfn_state_machine" "state_machine" {
},
"Resource": "arn:aws:states:::aws-sdk:batch:registerJobDefinition",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -179,7 +179,7 @@ resource "aws_sfn_state_machine" "state_machine" {
"ResultPath": null,
"TimeoutSeconds": ${local.timeout},
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -223,7 +223,7 @@ resource "aws_sfn_state_machine" "state_machine" {
}
},
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -271,7 +271,7 @@ resource "aws_sfn_state_machine" "state_machine" {
}
},
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down Expand Up @@ -340,7 +340,7 @@ resource "aws_sfn_state_machine" "state_machine" {
},
"Resource": "arn:aws:states:::aws-sdk:batch:deregisterJobDefinition",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand All @@ -355,7 +355,7 @@ resource "aws_sfn_state_machine" "state_machine" {
},
"Resource": "arn:aws:states:::aws-sdk:batch:deregisterJobDefinition",
"Retry": [ {
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException"],
"ErrorEquals": ["AWS.Batch.TooManyRequestsException", "Batch.BatchException", "Batch.AWSBatchException"],
"IntervalSeconds": 2,
"MaxAttempts": 7,
"BackoffRate": 5
Expand Down

0 comments on commit a6c5645

Please sign in to comment.