Repository navigation
Fix HybridPackager failing on paths with spaces or apostrophes - #646
Merged
Merged
Conversation
Signed-off-by: Rio Yu <[email protected]>
Contributor
|
/ok to test 08ee182 |
Contributor
|
/review |
svcnvidia-nemo-ci
approved these changes
Oct 9, 2026
svcnvidia-nemo-ci
left a comment
Contributor
There was a problem hiding this comment.
No merge-blocking defects found.
HybridPackager consistently quotes command path operands while preserving both archive layouts and cleanup behavior. The 12 regression cases cover spaces and apostrophes in all three targeted path locations, checking archive names, contents, and temporary-file removal.
Compared both changed files against base and inspected the sub-packager contracts, command runner, and an executor caller. Static review only; tests and platform-specific commands were not executed.
Review generated by codex
This branch was successfully deployed
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
HybridPackagerfails when the job directory, archive name, or a sub-packager's archive path contains a space or an apostrophe. Those paths are inserted unquoted into thetar,gzip, andrmcommands: spaces split them into separate arguments, while apostrophes break shell parsing.This quotes each file path with
shlex.quote(), as #637 and #645 did forPatternPackagerandGitArchivePackager. Otherwise the commands are unchanged. Bothextract_at_rootlayouts and the cleanup of temporary files and sub-archives work as before.Folder names inside the
tartransform expressions and executor extraction commands are outside this change.Tests
tar,gzip, andrmrun for real. The test checks the combined archive's file names and contents, and removal of temporary files and sub-archives./tmpmount to isolate host temporary files. Pytest exited successfully; Ray then printed an ignoredModuleNotFoundErrorfrom its shutdown hook.git diff --checkpass.