ignaski opened a new issue #18237:
URL: https://github.com/apache/airflow/issues/18237
### Apache Airflow Provider(s)
microsoft-azure
### Versions of Apache Airflow Providers
apache-airflow-providers-microsoft-azure==3.1.1
### Apache Airflow version
2.1.2
### Operating System
OSX
### Deployment
Docker-Compose
### Deployment details
_No response_
### What happened
`_get_blob_client` method in the wasb hook is trying to create a container
### What you expected to happen
I expect to get a container client of an existing container
### How to reproduce
_No response_
### Anything else
I believe the fix is minor, e.g.
```
def _get_blob_client(self, container_name: str, blob_name: str) ->
BlobClient:
"""
Instantiates a blob client
:param container_name: The name of the blob container
:type container_name: str
:param blob_name: The name of the blob. This needs not be existing
:type blob_name: str
"""
container_client = self.create_container(container_name)
return container_client.get_blob_client(blob_name)
```
should be changed to
```
def _get_blob_client(self, container_name: str, blob_name: str) ->
BlobClient:
"""
Instantiates a blob client
:param container_name: The name of the blob container
:type container_name: str
:param blob_name: The name of the blob. This needs not be existing
:type blob_name: str
"""
container_client = self._get_container_client(container_name)
return container_client.get_blob_client(blob_name)
```
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]