Invert SCP fallback to deny-list and increase install timeout#10533
Draft
alokedesai wants to merge 1 commit intomasterfrom
Draft
Invert SCP fallback to deny-list and increase install timeout#10533alokedesai wants to merge 1 commit intomasterfrom
alokedesai wants to merge 1 commit intomasterfrom
Conversation
- Increase INSTALL_TIMEOUT from 60s to 180s to accommodate slow hosts - Add --connect-timeout 15 to curl in install script so it fails fast on unreachable CDN hosts instead of blocking for the full TCP timeout - Refactor install_binary() SCP fallback from allow-list (only exit code 3) to deny-list (skip only exit code 2 = unsupported arch/OS). All other failures now trigger SCP fallback, covering DNS failures, SSL errors, connection refused, and other network issues (~65% of install errors) - Also trigger SCP fallback on timeout (previously returned TimedOut) - Add should_skip_scp_fallback() helper with unit tests - Add setup_tests for INSTALL_TIMEOUT value and curl connect-timeout Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Description
Invert the SCP fallback logic from an allow-list (only exit code 3) to a deny-list approach, and increase the install timeout. This is the highest-impact change for remote server install failures, covering ~65% of all install errors.
Changes
crates/remote_server/src/setup.rs: IncreaseINSTALL_TIMEOUTfrom 60s to 180s (3 minutes) to accommodate slow remote hosts.crates/remote_server/src/install_remote_server.sh: Add--connect-timeout 15to curl so it fails fast on unreachable CDN hosts instead of blocking for the full TCP timeout.app/src/remote_server/ssh_transport.rs: Refactorinstall_binary()SCP fallback:Error::TimedOut).should_skip_scp_fallback()helper function.Why
Previously, DNS failures (exit 6), SSL errors (exit 60), CA cert errors (exit 77), connection refused (exit 7), and other network issues would fail permanently without attempting SCP fallback. The new deny-list approach means any failure that isn't fundamentally unrecoverable (like wrong arch) will attempt the SCP path, where the client downloads the tarball locally and uploads via SCP.
Linked Issue
ready-to-specorready-to-implement.Testing
Unit tests for
should_skip_scp_fallback()covering exit codes 2 (skip), 0/1/3/6/7/28/60/77/-1 (don't skip)Unit tests for
INSTALL_TIMEOUTvalue (180s) and curl--connect-timeout 15presence in install scriptAll 57
remote_servertests pass, all 5ssh_transporttests passDocker integration test scripts created (DNS failure, connect-timeout) for manual validation
I have manually tested my changes locally with
./script/runAgent Mode
Conversation: https://staging.warp.dev/conversation/99fcf7a5-4132-4194-9699-a2c26900f06c
Run: https://oz.staging.warp.dev/runs/019e09f4-06e0-71ba-b6f8-56a4682975e9
This PR was generated with Oz.