feat(remote-server): add fallback routing for install failures#10507
Draft
alokedesai wants to merge 2 commits intomasterfrom
Draft
feat(remote-server): add fallback routing for install failures#10507alokedesai wants to merge 2 commits intomasterfrom
alokedesai wants to merge 2 commits intomasterfrom
Conversation
- install_remote_server.sh: retry with alternate HTTP client (curl→wget, wget→curl) on download failure; add distinct exit codes for download failure (4) and missing tar (5); add --connect-timeout and --retry to curl; add --timeout to wget - setup.rs: add DOWNLOAD_FAILED_EXIT_CODE (4) and NO_TAR_EXIT_CODE (5) constants; add is_non_retryable_host_error() to detect permission denied, no space, read-only FS, quota exceeded from stderr patterns; substitute new placeholders in install_script() - ssh_transport.rs: enhanced install_binary fallback routing: - exit 3 (no HTTP client) → SCP tarball fallback (existing) - exit 4 (download failed) → SCP tarball fallback (new) - exit 5 (no tar) → direct binary upload fallback (new) - timeout → SCP fallback (new) - exit 255 / non-retryable host errors → propagate immediately Add scp_install_binary_direct(): downloads tarball locally, extracts locally, uploads only the binary via SCP, chmod+mv remotely — avoids needing tar on the remote host. Refactor shared download logic into download_tarball_locally() and find_oz_binary_in_dir(). - setup_tests.rs: add tests for exit code distinctness, placeholder substitution, and is_non_retryable_host_error classification Co-Authored-By: Oz <oz-agent@warp.dev>
…iles
Add {download_failed_exit_code} and {no_tar_exit_code} substitutions to
the harness's prepare_install_script so it works with the updated
install_remote_server.sh template. Include the harness directory from
the remote-host-harness branch for before/after demo runs.
Co-Authored-By: Oz <oz-agent@warp.dev>
8a4e8ea to
6ad60c9
Compare
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.
Problem
The install script had a single remote-download path. Hosts without HTTP clients, hosts without
tar, and hosts with transient remote download problems failed before Warp could try a different delivery mechanism. Some failures also lost useful stderr or retried permanent host conditions such as permissions and disk errors.Solution
3when neithercurlnorwgetis available.4when remote download attempts fail after trying available clients.5whentaris unavailable.SshTransport:taruses direct binary upload after local extraction.Proof / validation
No screenshots are applicable because this is remote install behavior. Proof is before/after constructed-host output and validation commands:
04_missing_tar: beforeorigin/masterexited127withtar: not found; after exited sentinel5, which Rust routes to direct binary upload fallback.06_dns_failure: before exited6; after exited sentinel4with combined curl/wget DNS stderr, which Rust can route to fallback when retriable.08_http_403: before exited22; after exited sentinel4and the app-side classifier keeps it non-retriable so the original HTTP 403 is preserved.3, missing tar5, retriable download/network/TLS failures4, true host failures as expected failures, forced disconnect255, and missing Bash success.cargo fmtcargo test -p remote_server— 136 tests passedcargo check -p remote_servercargo check -p warpcargo clippy -p remote_server --all-targets -- -D warningscargo clippy -p warp --all-targets -- -D warningsCo-Authored-By: Oz oz-agent@warp.dev