From a6c5645be32ccfdd38e2e37008f062fcf16506b9 Mon Sep 17 00:00:00 2001 From: Trent Smith <1429913+Bento007@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:15:11 -0700 Subject: [PATCH] fix: retry schema-migration sfn on Batch.AWSBatchException (#7165) Co-authored-by: nayib-jose-gloria --- .happy/terraform/modules/schema_migration/main.tf | 10 +++++----- .happy/terraform/modules/sfn/main.tf | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.happy/terraform/modules/schema_migration/main.tf b/.happy/terraform/modules/schema_migration/main.tf index 755e2293a062..4d1c7e3b04fa 100644 --- a/.happy/terraform/modules/schema_migration/main.tf +++ b/.happy/terraform/modules/schema_migration/main.tf @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.happy/terraform/modules/sfn/main.tf b/.happy/terraform/modules/sfn/main.tf index a01cf5871927..21120f185e11 100644 --- a/.happy/terraform/modules/sfn/main.tf +++ b/.happy/terraform/modules/sfn/main.tf @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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