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 creation of ~/sky_logging/{timestamp} under dir running sky commands #2667

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Oct 5, 2023

Current master will create a log dir ~/sky_logging/{timestamp} under the dir you run sky commands:
image
This is because of one absent of os.path.expanduser introduced by the new provisioner. This PR fixed the bug.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky launch --cloud aws and check there is no extra dirs created
  • 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: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks for identifying the issue @cblmemo!

@@ -2872,7 +2872,7 @@ def _provision(
wheel_hash=wheel_hash,
provision_record=provision_record,
custom_resource=resources_vars.get('custom_resources'),
log_dir=self.log_dir)
log_dir=os.path.expanduser(self.log_dir))
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about we add it here instead?

log_path = os.path.join(log_dir, 'provision.log')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks!

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

LGTM.

@cblmemo cblmemo merged commit 491701c into master Oct 5, 2023
18 checks passed
@cblmemo cblmemo deleted the fix-logging branch October 5, 2023 20:48
jc9123 pushed a commit to jc9123/skypilot that referenced this pull request Oct 11, 2023
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.

None yet

2 participants