fix: add stall detection and faster retries to git fetch#33
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
fix: add stall detection and faster retries to git fetch#33devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Add http.lowSpeedLimit (1000 bytes/sec) and http.lowSpeedTime (15s) git configs to the fetch command. When the transfer speed drops below 1KB/s for 15 consecutive seconds, git aborts the fetch attempt. This enables the retry mechanism to actually work when connections stall, rather than having a single hung fetch consume the entire step-level timeout. Also switch fetch retries from the default 10-20s inter-attempt sleep to 1-5s. With a typical 3-minute step timeout, every second counts; the old delays could waste 40+ seconds on sleeps alone. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses checkout step timeouts (e.g. bnk-dev/bank run 27376021190 where 3 jobs failed and most "successful" checkouts took 100-178s). The root cause is a stalled
git fetchconsuming the entire step-level timeout with no chance for the retry mechanism to help.Two changes to
GitCommandManager.fetch():Stall detection via git's built-in HTTP low-speed abort:
If transfer speed drops below 1 KB/s for 15 consecutive seconds, git aborts the fetch attempt. Without this, a hung connection blocks until the step timeout (typically 3 minutes) kills everything — only one attempt ever runs.
Faster retry cadence —
RetryHelper(3, 1, 5)instead of the default(3, 10, 20). With a 3-minute step timeout, the old 10-20s inter-attempt sleeps wasted 20-40s. New 1-5s sleeps give all 3 attempts a fair chance within the budget:Data context (ClickHouse, last 6h for bnk-dev in us-west): 7187 successful checkouts avg 41s, 31 failures all at ~189s (= step timeout). Multiple customers affected across us-west, not region-specific.
Link to Devin session: https://app.devin.ai/sessions/88dbc85a54eb4f22b1bcf057a8509fcf
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled. (Staging)