fix(ssh): avoid remote tar metadata failures during file sync - #13955
Closed
zwcf5200 wants to merge 1 commit into
Closed
fix(ssh): avoid remote tar metadata failures during file sync#13955zwcf5200 wants to merge 1 commit into
zwcf5200 wants to merge 1 commit into
Conversation
Upload SSH file-sync archives from an explicit manifest instead of archiving the staging root. This avoids extracting directory entries like / and /home on the remote host, which can fail when tar tries to restore mtime or mode. Disable local macOS archive metadata with --no-xattrs and COPYFILE_DISABLE=1 so bsdtar does not emit LIBARCHIVE.xattr headers that remote tar reports as warnings.
Collaborator
|
Related to #10205 (SSH bulk sync extraction scope). This PR additionally avoids archiving parent dir entries and suppresses macOS xattr metadata. |
Collaborator
|
Related to #10205 |
4 tasks
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.
Summary
Fix SSH bulk file sync so tar extraction does not fail when remote tar tries to restore metadata for parent directories such as
/,/home, or..The previous bulk upload archived the whole staging root with
tar ... -C <staging> .and extracted it at/on the remote host. On macOS, bsdtar can also emit libarchive xattr metadata. In SSH profiles this produced warnings/errors like:Changes
--no-xattrsandCOPYFILE_DISABLE=1.Related
Related to #10205. That PR scopes extraction to
.hermes; this change additionally avoids archiving parent directory entries and suppresses macOS xattr metadata that can break remote extraction.Testing
source venv/bin/activate && scripts/run_tests.sh tests/tools/test_ssh_bulk_upload.py tests/tools/test_file_sync.pysource venv/bin/activate && uv run --active ruff check tools/environments/ssh.py tests/tools/test_ssh_bulk_upload.pyterminal_tool("pwd")returned/home/ubuntu/workspacewith nofile_sync: sync failedtar/utime warning.