Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b47975955 |
@@ -50,8 +50,9 @@ logger = logging.getLogger(__name__)
|
||||
# GitHub releases occasionally drops connections ("Remote end closed
|
||||
# connection without response"). Retrying with backoff before falling
|
||||
# through to the next fallback URL makes the build resilient to
|
||||
# momentary network blips.
|
||||
MAX_DOWNLOAD_RETRIES = 3
|
||||
# momentary network blips. 5 attempts with up to 30s between retries
|
||||
# handles sustained transient outages (observed in CI image builds).
|
||||
MAX_DOWNLOAD_RETRIES = 5
|
||||
|
||||
ACTIONLINT_VERSION = "1.7.12"
|
||||
|
||||
@@ -96,7 +97,7 @@ def _download(url: str, dest: Path, *, _sleep=None) -> None:
|
||||
"""
|
||||
retrying = Retrying(
|
||||
stop=stop_after_attempt(MAX_DOWNLOAD_RETRIES),
|
||||
wait=wait_exponential(multiplier=2, min=2, max=10),
|
||||
wait=wait_exponential(multiplier=2, min=2, max=30),
|
||||
retry=retry_if_exception_type((urllib.error.URLError, OSError, ConnectionError)),
|
||||
before_sleep=before_sleep_log(logger, logging.WARNING),
|
||||
sleep=_sleep if _sleep is not None else time.sleep,
|
||||
|
||||
Reference in New Issue
Block a user