fix(git): clone and fetch retry three times on a 5xx or connection error #546

Merged
sharang merged 1 commits from fix/git-fetch-retry into main 2026-10-09 14:22:35 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 d78d143457 fix(git): clone and fetch retry three times on a 5xx or connection error
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 9m57s
A git host that restarts answers 502 or refuses connections for a few
seconds, and every scan cloning in that window failed with "unexpected
http status code: 502". A clone, fetch or submodule fetch that fails with
a 5xx status, a timeout or a network error is now tried again after 5,
15 and 30 seconds. Authentication failures, 403, 404, bad references and
the download limits fail at once, as before. Each retry is logged at WARN
with the attempt and the wait; the wait hands the worker's other tasks to
another worker (block_in_place), so a waiting retry does not stall them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-09 16:01:19 +02:00