-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[Core] Add default excludes for working_dir uploads #59566
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
Merged
+127
−6
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0f42bbf
Add default excludes for working_dir uploads
631fa2e
rm redundant line
0495c3a
Update python/ray/_private/ray_constants.py
crypdick ee54723
PR feedback
crypdick 799f994
add warning if dir is being default-excluded
a49d5d7
lint, and normalize todo
aaed4b2
add missing space in concat
8203f3a
whoops wrong year
b177684
Merge branch 'master' into bugfix/default-excludes-working-dir
edoakes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| """Unit tests for working_dir runtime environment functionality.""" | ||
|
|
||
| import sys | ||
|
|
||
| import pytest | ||
|
|
||
| from ray._private.ray_constants import get_runtime_env_default_excludes | ||
|
|
||
| ENV_VAR = "RAY_OVERRIDE_RUNTIME_ENV_DEFAULT_EXCLUDES" | ||
|
|
||
|
|
||
| class TestGetRuntimeEnvDefaultExcludes: | ||
| """Tests for get_runtime_env_default_excludes().""" | ||
|
|
||
| def test_returns_defaults_when_env_var_not_set(self, monkeypatch): | ||
| monkeypatch.delenv(ENV_VAR, raising=False) | ||
| result = get_runtime_env_default_excludes() | ||
| assert ".git" in result and ".venv" in result | ||
|
|
||
| def test_empty_env_var_disables_defaults(self, monkeypatch): | ||
| monkeypatch.setenv(ENV_VAR, "") | ||
| assert get_runtime_env_default_excludes() == [] | ||
|
|
||
| def test_custom_env_var_overrides_defaults(self, monkeypatch): | ||
| monkeypatch.setenv(ENV_VAR, "foo, bar ,baz") | ||
| assert get_runtime_env_default_excludes() == ["foo", "bar", "baz"] | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| sys.exit(pytest.main(["-vv", __file__])) |
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.
Uh oh!
There was an error while loading. Please reload this page.