hussein-awala commented on code in PR #33457:
URL: https://github.com/apache/airflow/pull/33457#discussion_r1296481594


##########
airflow/providers/microsoft/azure/hooks/wasb.py:
##########
@@ -152,11 +153,13 @@ def get_conn(self) -> BlobServiceClient:
             # connection_string auth takes priority
             return BlobServiceClient.from_connection_string(connection_string, 
**extra)
 
-        account_url = (
-            conn.host
-            if conn.host and conn.host.startswith("https://";)
-            else f"https://{conn.login}.blob.core.windows.net/";
-        )
+        account_url = conn.host if conn.host else 
f"https://{conn.login}.blob.core.windows.net/";
+        parsed_url = urlparse(account_url)
+
+        if not parsed_url.netloc and "." not in parsed_url.path:
+            # if there's no netloc and no dots in the path, then user only
+            # provided the host ID, not the full URL or DNS name
+            account_url = f"https://{conn.login}.blob.core.windows.net/";

Review Comment:
   What do you mean by `host ID`? Is it account name? I wonder if we really 
need to skip the provided host or we should do something like:
   ```python
   account_url = f"https://{conn.host}.blob.core.windows.net/";
   ```



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

Reply via email to