Enhance user-facing error messages for remote server install failures#10531
Draft
alokedesai wants to merge 2 commits intomasterfrom
Draft
Enhance user-facing error messages for remote server install failures#10531alokedesai wants to merge 2 commits intomasterfrom
alokedesai wants to merge 2 commits intomasterfrom
Conversation
Improve the ScriptFailed arm in Error::user_facing_error() to detect specific patterns in stderr and produce targeted, actionable messages instead of the generic 'Script exited with code N: <stderr>'. New patterns detected: - Permission denied / Read-only file system → write permissions advice - No space left on device → disk space advice - Exit code 255 + empty stderr → SSH disconnect message - unsupported arch: <name> → architecture not supported message Includes 12 unit tests covering all error patterns and edge cases. Co-Authored-By: Oz <oz-agent@warp.dev>
Docker testing revealed that when the install directory runs out of space, curl exits with code 23 and 'Failure writing output to destination' rather than the OS-level 'No space left on device'. Add this pattern to the disk-full check and a corresponding unit test. 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
Enhance user-facing error messages in
transport.rsfor remote server install failures. Instead of showing the generic "Script exited with code N: " for allScriptFailederrors, theuser_facing_error()method now detects specific patterns in stderr and produces targeted, actionable messages:Script exited with code 1: mkdir: cannot create directory...Cannot create install directory — check write permissions on your home directory (exit code 1)Script exited with code 2: No space left on deviceNot enough disk space on the remote host — free up space and try again (exit code 2)Script exited with code 255:SSH connection was lost during installation — please reconnect and try againScript exited with code 2: unsupported arch: armv7lThis remote host uses a armv7l processor, which is not supported. Warp SSH extension requires x86_64 or aarch64 (arm64).Linked Issue
N/A — part of remote server install failure improvements initiative.
ready-to-specorready-to-implement.Testing
Added 12 unit tests in
transport_tests.rscovering all error patterns and edge cases:All tests pass.
cargo fmtandcargo clippypass clean../script/runAgent Mode
Conversation: https://staging.warp.dev/conversation/cd4e30c2-95e7-4516-860d-427a6afbc70f
Run: https://oz.staging.warp.dev/runs/019e09f4-0711-7661-aa65-13b07ae4ddcb
This PR was generated with Oz.