Merge pull request #24862 from ericgribkoff/fix_fallback_behavior

Do not try to generate unique suffix when keep_gcp_resources is set
pull/24864/head
Eric Gribkoff 4 years ago committed by GitHub
commit 8e824ab3f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      tools/run_tests/run_xds_tests.py

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

Loading…
Cancel
Save