DEVX-156: Add retry with backoff to install_tools download for transient network failures #255

Merged
emil merged 1 commits from DEVX-156-install-tools-retry into master 2026-08-12 18:15:27 +00:00
1 Commits
Author SHA1 Message Date
emilandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> dd603d3e91 fix: add tenacity retry to install_tools._download for transient network failures
CI / validate (pull_request) Successful in 1m41s
CI / auto-merge (pull_request) Successful in 17s
The build-images CI job failed because GitHub releases dropped
connections ("Remote end closed connection without response") for
actionlint, vale, and hadolint simultaneously. The previous code only
fell through to the next fallback URL — there was no retry on the same
URL for transient connection resets.

Now uses tenacity.Retrying with exponential backoff (2-10s, 3 attempts)
on URLError/OSError/ConnectionError, matching the pattern already used
in devx.utils.network. The _sleep kwarg allows tests to skip real
sleeping.

3 new tests cover: retry-then-success, exhaustion-after-max-retries,
and no-retry-on-non-transient-errors.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-12 20:13:03 +02:00