Skip to content

Commit

Permalink
additional comment on container_client.exists()
Browse files Browse the repository at this point in the history
  • Loading branch information
landscapepainter committed Jul 4, 2024
1 parent b5e2cc5 commit f87de9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sky/adaptors/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ def get_client(name: str, subscription_id: str, **kwargs):
return msgraph.GraphServiceClient(credential)
elif name == 'container':
# Currently, there is no way to check if the given endpoint url
# of a container is private or public. Hence, we approach with
# of a container is private or public. Also, either passing
# a credential to public container or not passing credential to
# private container throws an error. Hence, we approach with
# try-except block by first assuming the url is a public container.
# If it turns out to be a private container, an error will be
# caught and treated as private container.
# If it turns out to be a private container, an error is caught
# and the credential is passed, treating it as private container.
# Reference: https://github.com/Azure/azure-sdk-for-python/issues/35770 # pylint: disable=line-too-long
from azure.storage.blob import ContainerClient
container_url = kwargs.pop('container_url', None)
Expand Down

0 comments on commit f87de9d

Please sign in to comment.