From f206d9031dd792d5e10fc72f43329af6671d0faa Mon Sep 17 00:00:00 2001 From: megan07 Date: Thu, 12 Dec 2019 14:03:47 -0600 Subject: [PATCH] do not retry if sql api returns 409 for deleted instance name (#2817) Merged PR #2817. --- build/ansible | 2 +- build/inspec | 2 +- build/terraform | 2 +- build/terraform-beta | 2 +- third_party/terraform/utils/error_retry_predicates.go | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/ansible b/build/ansible index 6bc2d2006a6b..0259421c0b18 160000 --- a/build/ansible +++ b/build/ansible @@ -1 +1 @@ -Subproject commit 6bc2d2006a6b0bf29dcabd4829cc65c61af7dda2 +Subproject commit 0259421c0b18f8707130b154cbb6f8cca640bd99 diff --git a/build/inspec b/build/inspec index d5a76d6da24d..a0fa15be657f 160000 --- a/build/inspec +++ b/build/inspec @@ -1 +1 @@ -Subproject commit d5a76d6da24d67c6bdd115dadabdb181ecf5a921 +Subproject commit a0fa15be657f3a96f6e8ca02bca47abf4ae6d99f diff --git a/build/terraform b/build/terraform index f0622d834d0a..204438e31fe9 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit f0622d834d0a8271e9bee61579d05c9402dfda92 +Subproject commit 204438e31fe9b43b03de2aeb7e9ada392e77785a diff --git a/build/terraform-beta b/build/terraform-beta index bded0344e718..e8041aa4a80a 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit bded0344e71879203877f83cf4b5a0fb4dd0228e +Subproject commit e8041aa4a80aa1414043959b193cd828bd1a1ec8 diff --git a/third_party/terraform/utils/error_retry_predicates.go b/third_party/terraform/utils/error_retry_predicates.go index d02614392a9d..c5d02726fc45 100644 --- a/third_party/terraform/utils/error_retry_predicates.go +++ b/third_party/terraform/utils/error_retry_predicates.go @@ -33,6 +33,10 @@ func pubsubTopicProjectNotReady(err error) (bool, string) { func isSqlOperationInProgressError(err error) (bool, string) { if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 409 { + if strings.Contains(gerr.Body, "you cannot reuse the name of the deleted instance until one week from the deletion date.") { + return false, "" + } + return true, "Waiting for other concurrent Cloud SQL operations to finish" } return false, ""