From 0b47975955ff81aae60247befcdf987bd2af1258 Mon Sep 17 00:00:00 2001 From: emil Date: Wed, 12 Aug 2026 23:35:10 +0200 Subject: [PATCH] fix: increase download retry attempts and backoff for transient GitHub outages The CI image build (run 3597) failed because install_tools._download exhausted its 3 retry attempts on RemoteDisconnected errors from GitHub releases. The max backoff of 10s was too short for sustained transient outages. - Increase MAX_DOWNLOAD_RETRIES from 3 to 5 - Increase max backoff from 10s to 30s DEVX-158 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- src/devx/tools/install_tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/devx/tools/install_tools.py b/src/devx/tools/install_tools.py index 51aa39c..29e775a 100644 --- a/src/devx/tools/install_tools.py +++ b/src/devx/tools/install_tools.py @@ -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,