Repository navigation
fix(minimal): retry a refused daemon socket connect in the ssh proxy command - #1919
Conversation
…command A burst of concurrent `min session exec` invocations can overflow the daemon's accept backlog, so the proxy's single connect attempt fails spuriously with ECONNREFUSED. Retry the connect a bounded number of times (20, 100ms apart) on ConnectionRefused only; a NotFound (no socket file) still fails immediately so a proxy against a daemon that is not running does not hang for the retry window.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe proxy command now retries Unix-socket connections that return ChangesProxy connection retry
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change makes the SSH proxy connection to the daemon more resilient to a full accept backlog. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit waits beside the door Comment |
A non-blocking AF_UNIX connect against a full accept backlog fails with EAGAIN (WouldBlock) on Linux, not ECONNREFUSED, so the proxy retry never fired there. Retry both kinds.
…he socket path Assert the missing-socket error names the socket path, not just the 'connect to' prefix, and add a Linux-only test that fills a zero accept backlog until a connect would block, then drains it and checks that connect_with_retry still reaches the listener.
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABU1Jl2A
Defect
min proxy --socket <sock>(the SSH ProxyCommand) connects to the daemon UDS once with no retry. A burst of concurrentmin session execinvocations can overflow the daemon accept backlog, so the proxy fails spuriously with ECONNREFUSED.Change
Retry the connect a bounded number of times (20, 100ms apart) on
ConnectionRefusedonly. ANotFound(no socket file) still fails immediately, so a proxy against a daemon that is not running does not hang for the retry window. Reuses the client crate retry constants by making thempub.Verification
cargo fmt --all --checkpassescargo clippy -p minimal -p minimal-client --all-targets --locked --no-deps -- -D warningspassescargo build -p minimal --lockedpassescargo test -p minimal --locked connect_with_retrypasses (2/2)Note: workspace-wide clippy and one unrelated lib test (
legacy_network_spellings_parse_with_hint) fail on this checkout due to a pre-existing toolchain mismatch (stable 1.99.0 vs pinned 1.97.0) and are untouched by this change.Summary by CodeRabbit