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

[Setup] Make setup more robust when there is no permission to get/write commit hash #2731

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

Michaelvll
Copy link
Collaborator

This fixes an issue introduced by #2720: a permission error can be raised when there is no permission to write the __init__ file during sky launch

PermissionError: [Errno 13] Permission denied: '/var/folders/cc/xxxxxx/T/tmp40gtc6r1/sky/__init__.py'

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: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

LGTM! Left one nit ;)

except Exception: # pylint: disable=broad-except
except Exception as e: # pylint: disable=broad-except
print(
'WARNING: SkyPilot fail to get the commit hash in '
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably use a constant for the error message to avoid duplication?

@Michaelvll Michaelvll merged commit 5ed33f9 into master Oct 25, 2023
18 checks passed
@Michaelvll Michaelvll deleted the avoid-breaking-installation branch October 25, 2023 20:27
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