From cff08aa7c15c94b27134d3478f168dec9c229b5d Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Mon, 8 Jun 2020 22:37:43 +0000 Subject: [PATCH] google_dataflow_job - retry on common API errors when waiting for job to update (#3612) Signed-off-by: Modular Magician --- .changelog/3612.txt | 3 +++ google-beta/resource_dataflow_job.go | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .changelog/3612.txt diff --git a/.changelog/3612.txt b/.changelog/3612.txt new file mode 100644 index 0000000000..5d6dc2b2cd --- /dev/null +++ b/.changelog/3612.txt @@ -0,0 +1,3 @@ +```release-note:bug +dataflow: added retries in `google_dataflow_job` for common retryable API errors when waiting for job to update +``` diff --git a/google-beta/resource_dataflow_job.go b/google-beta/resource_dataflow_job.go index f58bd07c2d..16c2409d4c 100644 --- a/google-beta/resource_dataflow_job.go +++ b/google-beta/resource_dataflow_job.go @@ -522,6 +522,9 @@ func waitForDataflowJobToBeUpdated(d *schema.ResourceData, config *Config, repla replacementJob, err := resourceDataflowJobGetJob(config, project, region, replacementJobID) if err != nil { + if isRetryableError(err) { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) }