ignaski commented on a change in pull request #18287:
URL: https://github.com/apache/airflow/pull/18287#discussion_r709911759
##########
File path: airflow/providers/microsoft/azure/hooks/wasb.py
##########
@@ -172,7 +172,7 @@ def _get_blob_client(self, container_name: str, blob_name:
str) -> BlobClient:
:param blob_name: The name of the blob. This needs not be existing
:type blob_name: str
"""
- container_client = self.create_container(container_name)
+ container_client = self._get_container_client(container_name)
Review comment:
> The current behaviour is intentional. We create the container if it
doesn't already exist. If it already exists, we return the client of the
already existing container. However, we can improve it by having
`_get_blob_client` take an optional argument like
`create_container_if_not_existing=True`. If True we call `create_container`
else we call `_get_container_client`
The behaviour is quite unexpected. E.g. if I want to check for a blob I do
not want a container to be created, because I am expecting a blob in an
existing container. Furthermore, if connecting with read only permission, the
current code throws an exception of permission denied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]