-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Serve] [runtime env] Replace os.rename with shutil.move in remove_dir_from_filepaths() #22018
Merged
edoakes
merged 5 commits into
ray-project:master
from
shrekris-anyscale:unzip_cross_file_sys
Feb 1, 2022
Merged
[Serve] [runtime env] Replace os.rename with shutil.move in remove_dir_from_filepaths() #22018
edoakes
merged 5 commits into
ray-project:master
from
shrekris-anyscale:unzip_cross_file_sys
Feb 1, 2022
Conversation
This file contains 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
edoakes
approved these changes
Feb 1, 2022
@shrekris-anyscale looks like linter is failing. I needed to do |
@shrekris-anyscale any good way to test this? If not, can we at least leave a comment saying why it's important to use |
I'm not sure of a way to unit test this cross-file system bug. I added a comment explaining why we should use |
edoakes
reviewed
Feb 1, 2022
smorad
pushed a commit
to smorad/ray
that referenced
this pull request
Feb 7, 2022
…r_from_filepaths() (ray-project#22018) Currently, the `remove_dir_from_filepaths()` function uses `os.rename()` when shifting directories and files. This change replaces [`os.rename()`](https://docs.python.org/3/library/os.html#os.rename) with [`shutil.move()`](https://docs.python.org/3/library/shutil.html#shutil.move) to support these operations even when the directory's parent and the temporary directory are located on separate file systems.
simon-mo
pushed a commit
that referenced
this pull request
Mar 25, 2022
…r_from_filepaths() (#22018) Currently, the `remove_dir_from_filepaths()` function uses `os.rename()` when shifting directories and files. This change replaces [`os.rename()`](https://docs.python.org/3/library/os.html#os.rename) with [`shutil.move()`](https://docs.python.org/3/library/shutil.html#shutil.move) to support these operations even when the directory's parent and the temporary directory are located on separate file systems.
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.
Why are these changes needed?
Currently, the
remove_dir_from_filepaths()
function usesos.rename()
when shifting directories and files. This change replacesos.rename()
withshutil.move()
to support these operations even when the directory's parent and the temporary directory are located on separate file systems.Related issue number
N/A
Checks
scripts/format.sh
to lint the changes in this PR.