-
Notifications
You must be signed in to change notification settings - Fork 566
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
[Storage] Azure bucket sub directory is ignored if the bucket previously exists #4706
Conversation
sky/data/storage.py
Outdated
'sync_on_reconstruction', True), | ||
# Backward compatibility | ||
# TODO: remove the hasattr check after v0.11.0 | ||
_bucket_sub_path=override_args.get( | ||
'_bucket_sub_path', | ||
metadata._bucket_sub_path # pylint: disable=protected-access | ||
) if hasattr(metadata, '_bucket_sub_path') else None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main part that resolves issue 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we update test_managed_jobs_intermediate_storage
to also support azure so that we can include this test case?
There seems a bunch of places that require |
Sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Michaelvll
@@ -354,7 +354,8 @@ def from_metadata(cls, metadata: StoreMetadata, **override_args): | |||
metadata.is_sky_managed), | |||
sync_on_reconstruction=override_args.get('sync_on_reconstruction', | |||
True), | |||
# backward compatibility | |||
# Backward compatibility | |||
# TODO: remove the hasattr check after v0.11.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we saying that backward compatibility is removed after v0.11.0?
For example, v0.6.0 won't be compatible with v0.11.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have a convention that keep backward compatibilty for 3 major releases.
/smoke-test --azure -k TestStorageWithCredentials |
/smoke-test --azure -k TestStorageWithCredentials |
/smoke-test --azure -k TestStorageWithCredentials |
/smoke-test --azure -k test_docker_storage_mounts |
cc'ing @romilbhardwaj for a quick look as well : ) |
This PR resolves two issues:
Issue 1: When there is an existing Azure bucket in SkyPilot storage database, the sub path will be ignored. This affects the smoke test
pytest tests/test_smoke.py::test_managed_jobs_storage --azure
.To reproduce:
jobs.bucket: https://xxx.blob.core.windows.net/yyy
that is previously created by SkyPilot in~/.sky/config.yaml
sky jobs launch -n test-azure-upload test.yaml
The bucket will be polluted with in the root directory, and the job above fails with:
Detailed Error
Issue 2: During the file mounts, the storage upload does not include the sub directory, which can be a bit confusing:
previously
Now
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh