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

Allow setting the workdir using environment variables #3792

Merged
merged 4 commits into from
Jul 28, 2024

Conversation

BabyChouSr
Copy link
Contributor

@BabyChouSr BabyChouSr commented Jul 27, 2024

Allows the workdir to be configured using environment variables.

Closes #3271

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @BabyChouSr! I tested manually and it works. Can we add some tests for this functionality?

@BabyChouSr
Copy link
Contributor Author

Thanks @BabyChouSr! I tested manually and it works. Can we add some tests for this functionality?

Yup! just added a simple one in test_yaml_parser.py.

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @BabyChouSr! This should be good to go after the linter passes.

@@ -146,3 +146,13 @@ def test_invalid_empty_envs(tmp_path):
with pytest.raises(ValueError) as e:
Task.from_yaml(config_path)
assert 'Environment variable \'env_key2\' is None.' in e.value.args[0]

Copy link
Collaborator

Choose a reason for hiding this comment

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

You may want to run ./format.sh (after running pip install -r requirements-dev.txt) to keep the linter happy.

Suggested change

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @BabyChouSr! LGTM after a minor nit.

tests/test_yaml_parser.py Outdated Show resolved Hide resolved
@romilbhardwaj romilbhardwaj added this pull request to the merge queue Jul 28, 2024
Merged via the queue into skypilot-org:master with commit 92727c7 Jul 28, 2024
20 checks passed
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.

Allow setting the workdir using environment variables
2 participants