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



##########
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:
       Well. For me this one looks like it REMOVES the MIC support. From what I 
see, the previous code worked in the way this PR intended to (if conn.password 
= None, then managedidentity credential was created and used. This PR makes the 
credential created but not used. Did I miss something?




-- 
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:
[email protected]


Reply via email to