You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/03 07:22:25 UTC
[GitHub] [airflow] tanelk commented on a diff in pull request #24154: Pass connection extra parameters to wasb BlobServiceClient
tanelk commented on code in PR #24154:
URL: https://github.com/apache/airflow/pull/24154#discussion_r888683449
##########
airflow/providers/microsoft/azure/hooks/wasb.py:
##########
@@ -121,31 +121,41 @@ def get_conn(self) -> BlobServiceClient:
# Here we use anonymous public read
# more info
# https://docs.microsoft.com/en-us/azure/storage/blobs/storage-manage-access-to-resources
- return BlobServiceClient(account_url=conn.host)
+ return BlobServiceClient(account_url=conn.host, **extra)
- if extra.get('connection_string') or extra.get('extra__wasb__connection_string'):
+ def pop_keys(*keys):
+ res = None
+ for key in keys:
+ value = extra.pop(key, None)
+ res = res or value
+
+ return res
Review Comment:
This seems ugly - I'm open for suggestions.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org