From 4e8fe737d0058fc5e8b072e16e4bbea1696a7b2c Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 17 Jul 2019 12:31:47 -0700 Subject: [PATCH] [ansible] stop some async errors from being suppressed (#314) Signed-off-by: Modular Magician --- lib/ansible/modules/cloud/google/gcp_redis_instance.py | 2 +- lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py | 2 +- lib/ansible/modules/cloud/google/gcp_spanner_database.py | 2 +- lib/ansible/modules/cloud/google/gcp_spanner_instance.py | 2 +- lib/ansible/modules/cloud/google/gcp_tpu_node.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_redis_instance.py b/lib/ansible/modules/cloud/google/gcp_redis_instance.py index 3f39cc3b828346..87a3347abaa0bc 100644 --- a/lib/ansible/modules/cloud/google/gcp_redis_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_redis_instance.py @@ -471,7 +471,7 @@ def wait_for_operation(module, response): return {} status = navigate_hash(op_result, ['done']) wait_done = wait_for_completion(status, op_result, module) - raise_if_errors(op_result, ['error'], module) + raise_if_errors(wait_done, ['error'], module) return navigate_hash(wait_done, ['response']) diff --git a/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py b/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py index b5b9bfbd0db932..bf9c2556203f83 100644 --- a/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py +++ b/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py @@ -335,7 +335,7 @@ def wait_for_operation(module, response): return {} status = navigate_hash(op_result, ['done']) wait_done = wait_for_completion(status, op_result, module) - raise_if_errors(op_result, ['error'], module) + raise_if_errors(wait_done, ['error'], module) return navigate_hash(wait_done, ['response']) diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database.py b/lib/ansible/modules/cloud/google/gcp_spanner_database.py index 38a67015d92347..e59d4c950e7d44 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database.py @@ -283,7 +283,7 @@ def wait_for_operation(module, response): return {} status = navigate_hash(op_result, ['done']) wait_done = wait_for_completion(status, op_result, module) - raise_if_errors(op_result, ['error'], module) + raise_if_errors(wait_done, ['error'], module) return navigate_hash(wait_done, ['response']) diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_instance.py b/lib/ansible/modules/cloud/google/gcp_spanner_instance.py index f5927f25bda892..8b7dd74bd5fe61 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_instance.py @@ -308,7 +308,7 @@ def wait_for_operation(module, response): return {} status = navigate_hash(op_result, ['done']) wait_done = wait_for_completion(status, op_result, module) - raise_if_errors(op_result, ['error'], module) + raise_if_errors(wait_done, ['error'], module) return navigate_hash(wait_done, ['response']) diff --git a/lib/ansible/modules/cloud/google/gcp_tpu_node.py b/lib/ansible/modules/cloud/google/gcp_tpu_node.py index e7325f2c9e878f..afd00aceb0ddd8 100644 --- a/lib/ansible/modules/cloud/google/gcp_tpu_node.py +++ b/lib/ansible/modules/cloud/google/gcp_tpu_node.py @@ -411,7 +411,7 @@ def wait_for_operation(module, response): return {} status = navigate_hash(op_result, ['done']) wait_done = wait_for_completion(status, op_result, module) - raise_if_errors(op_result, ['error'], module) + raise_if_errors(wait_done, ['error'], module) return navigate_hash(wait_done, ['response'])