Do not try to generate unique suffix when keep_gcp_resources is set

pull/24862/head
Eric Gribkoff 4 years ago
parent 1eeeaf6df5
commit 057c1d1faf
  1. 10
      tools/run_tests/run_xds_tests.py

@ -1942,11 +1942,13 @@ try:
gcp_suffix = args.gcp_suffix gcp_suffix = args.gcp_suffix
health_check_name = _BASE_HEALTH_CHECK_NAME + gcp_suffix health_check_name = _BASE_HEALTH_CHECK_NAME + gcp_suffix
if not args.use_existing_gcp_resources: if not args.use_existing_gcp_resources:
if gcp_suffix: if args.keep_gcp_resources:
num_attempts = 5 # Auto-generating a unique suffix in case of conflict should not be
else: # combined with --keep_gcp_resources, as the suffix actually used
# If not given a suffix, do not retry if already in use. # for GCP resources will not match the provided --gcp_suffix value.
num_attempts = 1 num_attempts = 1
else:
num_attempts = 5
for i in range(num_attempts): for i in range(num_attempts):
try: try:
logger.info('Using GCP suffix %s', gcp_suffix) logger.info('Using GCP suffix %s', gcp_suffix)

Loading…
Cancel
Save