Skip to content

[RuntimeEnv] exec_worker failing on windows installations with spaces - #25151

Closed
bushshrub wants to merge 35 commits into
ray-project:masterfrom
bushshrub:master
Closed

bushshrub wants to merge 35 commits into
ray-project:masterfrom
bushshrub:master

Conversation

@bushshrub

@bushshrub bushshrub commented May 24, 2022 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

On Windows systems, the exec_worker method may fail due to spaces being present in arguments that are file paths. This addresses said issue.

Related issue number

Closes #24574

Checks

@mwtian

mwtian commented May 24, 2022

Copy link
Copy Markdown
Member

Adding folks familiar with runtime env. Is it possible to add a test for this?

@mwtian mwtian changed the title fix: exec_worker failing on windows installations with spaces [RuntimeEnv] exec_worker failing on windows installations with spaces May 24, 2022
@bushshrub

bushshrub commented May 25, 2022 •

Copy link
Copy Markdown
Contributor Author

Pinging @SJ-L

@edoakes

edoakes commented May 25, 2022

Copy link
Copy Markdown
Collaborator

@xiurobert what's the testing plan here?

@bushshrub

Copy link
Copy Markdown
Contributor Author

Not 100% sure, but I'm thinking creating a python file with spaces and seeing if this change fixes it? Just need to locate where the runtime_env tests are stored.

@bushshrub

bushshrub commented May 27, 2022 •

Copy link
Copy Markdown
Contributor Author

Honestly, I think this code I wrote is more of a hack than actually a real solution to the problem. The real solution should be to either handle arguments that are paths upstream, or inform the method that paths are being passed in. In any case, can @SJ-L please try out this code?

@bushshrub
bushshrub requested a review from mwtian May 31, 2022 15:41
@architkulkarni

Copy link
Copy Markdown
Contributor

@xiurobert the tests are in the files test_runtime_env_*.py, perhaps you could try adding a test there? Let me know if you have any questions.

The fix looks reasonable to me, @mattip could you please help review this PR and see if there are any issues or edge cases for Windows?

@bushshrub

Copy link
Copy Markdown
Contributor Author

@xiurobert the tests are in the files test_runtime_env_*.py, perhaps you could try adding a test there? Let me know if you have any questions.

The fix looks reasonable to me, @mattip could you please help review this PR and see if there are any issues or edge cases for Windows?

Sounds good, I will add in a test.

@bushshrub

bushshrub commented Jun 2, 2022 •

Copy link
Copy Markdown
Contributor Author

@architkulkarni I created the tests under test_runtime_env_ray_minimal.py. I had to abstract out the argument fixing for windows into a separate method so it can actually be tested. Unfortunately I don't have a Windows system to test it on my local machine so.

@architkulkarni

Copy link
Copy Markdown
Contributor

Thanks for adding the test, it looks good! Let's wait for @mattip's review.

@mattip

mattip commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

This seems to have broken runtime environment tests

@architkulkarni

Copy link
Copy Markdown
Contributor

@bushshrub

Copy link
Copy Markdown
Contributor Author

Oh, very sorry about that. I rebased the branch and github did some weird things.

@bushshrub
bushshrub marked this pull request as draft June 10, 2022 13:44
@bushshrub

Copy link
Copy Markdown
Contributor Author

Sorry, let me close this PR. I will re-open a new one

@bushshrub bushshrub closed this Jun 10, 2022
@bushshrub

Copy link
Copy Markdown
Contributor Author

Please see #25659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ray cannot find Python.exe because of spaces in path<Ray component: Core|RLlib|etc...>]