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 2021/06/24 11:05:59 UTC

[GitHub] [airflow] malthe commented on a change in pull request #16628: Add support for managed identity in WASB hook

malthe commented on a change in pull request #16628:
URL: https://github.com/apache/airflow/pull/16628#discussion_r657848361



##########
File path: airflow/providers/microsoft/azure/hooks/wasb.py
##########
@@ -140,9 +140,13 @@ def get_conn(self) -> BlobServiceClient:  # pylint: disable=too-many-return-stat
             return BlobServiceClient(account_url=f"https://{conn.login}.blob.core.windows.net/" + sas_token)
 
         # Fall back to old auth (password) or use managed identity if not provided.
+        credential = conn.password
+        if not credential:
+            credential = ManagedIdentityCredential()
+            self.log.info("Using managed identity as credential")
         return BlobServiceClient(
             account_url=f"https://{conn.login}.blob.core.windows.net/",
-            credential=conn.password or ManagedIdentityCredential(),
+            credential=conn.password,

Review comment:
       Of course – fixed. Nice catch




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org