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

Make path_size_megabytes() more robust. #2049

Merged
merged 2 commits into from
Jun 8, 2023
Merged

Conversation

concretevitamin
Copy link
Member

Saw some parsing errors that threw ValueError.

This change

  • uses regex to look for 'total size is ...'
  • on error, return -1 as estimated size, as it's used for warnings only

Tested (run the relevant ones):

  • Any manual or new tests for this PR (please specify below)
    • sky launch test.yaml with workdir: .; checked that sizes are correct
  • 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 the changes @concretevitamin! LGTM. Some questions

sky/backends/backend_utils.py Show resolved Hide resolved
sky/backends/backend_utils.py Outdated Show resolved Hide resolved
sky/backends/backend_utils.py Show resolved Hide resolved
@concretevitamin concretevitamin merged commit 5846c93 into master Jun 8, 2023
15 checks passed
@concretevitamin concretevitamin deleted the fix-size-est branch June 8, 2023 05:01
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