diff --git a/external/pip_requirements.txt b/external/pip_requirements.txt index 5aaa75d727..68af1aaee3 100644 --- a/external/pip_requirements.txt +++ b/external/pip_requirements.txt @@ -1,2 +1,3 @@ absl-py protobuf +retry diff --git a/scripts/gha/integration_testing/ftl_gha_validator.py b/scripts/gha/integration_testing/ftl_gha_validator.py index 5af4b5d3a3..4350738245 100644 --- a/scripts/gha/integration_testing/ftl_gha_validator.py +++ b/scripts/gha/integration_testing/ftl_gha_validator.py @@ -19,6 +19,7 @@ import subprocess import shutil import re +from retry import retry GSUTIL = shutil.which("gsutil") @@ -73,7 +74,7 @@ def _get_testapp_log_text_from_gcs(gcs_path): logging.error("Unexpected error reading GCS log:\n%s", e) return None - +@retry(subprocess.CalledProcessError, tries=3, delay=10) def _gcs_list_dir(gcs_path): """Recursively returns a list of contents for a directory on GCS.""" args = [GSUTIL, "ls", "-r", gcs_path] @@ -82,6 +83,7 @@ def _gcs_list_dir(gcs_path): return result.stdout.splitlines() +@retry(subprocess.CalledProcessError, tries=3, delay=10) def _gcs_read_file(gcs_path): """Extracts the contents of a file on GCS.""" args = [GSUTIL, "cat", gcs_path] diff --git a/scripts/gha/python_requirements.txt b/scripts/gha/python_requirements.txt index 6541e322ff..ac784371ac 100644 --- a/scripts/gha/python_requirements.txt +++ b/scripts/gha/python_requirements.txt @@ -2,3 +2,4 @@ attrs absl-py pytz requests +retry