Add amd64 arch mapping, tar pre-check, and gzip SCP fallback#10534
Draft
alokedesai wants to merge 1 commit intomasterfrom
Draft
Add amd64 arch mapping, tar pre-check, and gzip SCP fallback#10534alokedesai wants to merge 1 commit intomasterfrom
alokedesai wants to merge 1 commit intomasterfrom
Conversation
Three related fixes for remote-server install failures: 1. amd64 arch mapping: Add 'amd64' to the x86_64 arm in both parse_uname_output() (setup.rs) and the install script's case statement. Some hosts report 'amd64' from uname -m instead of 'x86_64'. 2. tar pre-check: Add a 'command -v tar' check in the install script before attempting any download. If tar is missing, the script exits with NO_TAR_EXIT_CODE (4) immediately, avoiding a wasted download. The new constant and placeholder substitution are wired through setup.rs. 3. gzip SCP fallback: Add a new gzip_scp_install_fallback() function in ssh_transport.rs, triggered when the install script exits with NO_TAR_EXIT_CODE. The fallback downloads the tarball locally, extracts the binary locally with tar, gzips just the binary, uploads the .gz via SCP, then runs 'gzip -d' + 'chmod +x' on the remote host. 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
Problem: Three related install script issues:
amd64fromuname -minstead ofx86_64(FreeBSD-style, some WSL configs). Both the shell script and Rust-sideparse_uname_output()reject this as unsupported, even though amd64 IS x86_64.tar. The install script downloads the full tarball before discovering tar is missing, wasting bandwidth and time.Solution:
"amd64"to the x86_64 match arm in bothparse_uname_output()and the install script case statement.command -v tarcheck in the install script BEFORE downloading. Exits withNO_TAR_EXIT_CODE = 4so the Rust side can handle it distinctly.gzip_scp_install_fallback()function that downloads the tarball locally, extracts the binary locally with tar, gzips just the binary, SCPs the.gzto the remote, and runsgzip -d && chmod +xvia SSH. This only requiresgzipon the remote (present on virtually all Linux systems including minimal Docker images).Linked Issue
ready-to-specorready-to-implement.Testing
Unit tests (all passing):
cargo test -p remote_server -- setup::tests— 26 passed, 0 failedcargo fmt/cargo clippy— cleanNew tests:
parse_uname_linux_amd64— verifies"Linux amd64"maps toRemotePlatform { os: Linux, arch: X86_64 }parse_uname_unsupported_armv7l— verifies"Linux armv7l"returnsUnsupportedArchinstall_script_contains_no_tar_exit_code— verifies{no_tar_exit_code}placeholder is substitutedinstall_script_contains_tar_pre_check— verifiescommand -v taris present in scriptIntegration tests (shell-based, 7/7 pass):
Impact: Addresses unsupported arch amd64 (0.7%), tar not found (0.6%)
./script/runAgent Mode
Co-Authored-By: Oz oz-agent@warp.dev
CHANGELOG-IMPROVEMENT: SSH extension now supports amd64 architecture and can install on hosts without tar via gzip fallback