abhishekbhakat opened a new pull request, #36309:
URL: https://github.com/apache/airflow/pull/36309
AzureFileShareHook creating with an Azure connection fails with below error:
```python
>>> filenames = fileshare_hook.list_directories_and_files()
[2023-12-19T05:58:35.515+0000] {base.py:83} INFO - Using connection ID
'azure_default' for task execution.
[2023-12-19T05:58:35.516+0000] {environment.py:109} INFO - No environment
configuration found.
[2023-12-19T05:58:35.516+0000] {managed_identity.py:96} INFO -
ManagedIdentityCredential will use IMDS
Traceback (most recent call last):
File
"/usr/local/lib/python3.11/site-packages/azure/storage/fileshare/_directory_client.py",
line 111, in __init__
if not account_url.lower().startswith('http'):
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python3.11/site-packages/airflow/providers/microsoft/azure/hooks/fileshare.py",
line 192, in list_directories_and_files
return list(self.share_directory_client.list_directories_and_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.11/site-packages/airflow/providers/microsoft/azure/hooks/fileshare.py",
line 153, in share_directory_client
return ShareDirectoryClient(
^^^^^^^^^^^^^^^^^^^^^
File
"/usr/local/lib/python3.11/site-packages/azure/storage/fileshare/_directory_client.py",
line 114, in __init__
raise ValueError("Account URL must be a string.") from exc
ValueError: Account URL must be a string.
```
It just needed a get_conn() call for `ShareDirectoryClient` &
`ShareFileClient`.
--
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]