Skip to content
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

fix for cleaning working dir in case of same uri #49313

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

ujjawal-khare
Copy link

@ujjawal-khare ujjawal-khare commented Dec 17, 2024

Related issue number

"Closes #49036"

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a merge conflict, can you update

python/ray/tests/test_runtime_env_working_dir.py Outdated Show resolved Hide resolved
ujjawal-khare and others added 9 commits December 23, 2024 12:22
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
@ujjawal-khare ujjawal-khare changed the title fix for cleaning working dir in case of same uri fix for cleaning working dir in case of same uri [WIP] Dec 27, 2024
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare and others added 3 commits December 27, 2024 12:18
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
@ujjawal-khare ujjawal-khare changed the title fix for cleaning working dir in case of same uri [WIP] fix for cleaning working dir in case of same uri Dec 27, 2024
@dayshah dayshah added the go add ONLY when ready to merge, run all tests label Dec 31, 2024
Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a valid change @rynewang

@rynewang
Copy link
Contributor

rynewang commented Jan 3, 2025

LGTM, needs Train approval @justinvyu

Comment on lines 252 to 254
return [
os.path.relpath(file_info.path.lstrip("/"), start=fs_path.lstrip("/"))
os.path.relpath(os.path.abspath(file_info.path), start=os.path.abspath(fs_path))
for file_info in fs.get_file_info(selector)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these changes needed for this PR? Converting to abspath before doing relpath is pretty confusing for non-local filesystems (such as S3) where abs path doesn't make sense.

Let's revert this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinvyu The test case was failing Buildkite Link due to an issue with path handling. Specifically, the file system mount was unable to locate the directory because of a mismatch between file_info.path and fs_path. To resolve this, I converted the paths to abs_path to ensure consistency and proper resolution.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see that this test fails due to this line of code? The change above seems unrelated to this code.

As I mentioned above, we should not use abs path for this method anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ray Job] : Working Dir files does not get changed even if remote URI contents get changed
6 participants