From 1b758b7660da92b0864d6cef8410f8662fab29bb Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Thu, 29 Jul 2021 10:42:22 -0700 Subject: [PATCH] Avoid unsetting target_proxy when it is actually a gRPC target proxy (#26824) Otherwise, unless force_cleanup is set to true, the HTTP target proxy deletion fails but still unsets the target_proxy field, resulting in the gRPC target proxy deletion being skipped (and preventing all subsequent cleanup operations) --- .../framework/infrastructure/traffic_director.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py b/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py index 0f751330819..d05bb67e9d2 100644 --- a/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py +++ b/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py @@ -412,7 +412,7 @@ class TrafficDirectorManager: def delete_target_http_proxy(self, force=False): if force: name = self.make_resource_name(self.TARGET_PROXY_NAME) - elif self.target_proxy: + elif self.target_proxy and self.target_proxy_is_http: name = self.target_proxy.name else: return