aaron-y-chen commented on code in PR #68344:
URL: https://github.com/apache/airflow/pull/68344#discussion_r3679911354
##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/adls.py:
##########
@@ -47,12 +67,17 @@ def get_fs(conn_id: str | None, storage_options: dict[str,
Any] | None = None) -
if connection_string:
return AzureBlobFileSystem(connection_string=connection_string)
- options: dict[str, Any] = {
- "account_url": parse_blob_account_url(conn.host, conn.login),
- }
-
# mirror handling of custom field "client_secret_auth_config" from extras.
Ignore if missing as AzureBlobFileSystem can handle.
tenant_id = get_field(conn_id=conn_id, conn_type=conn_type, extras=extras,
field_name="tenant_id")
+ options: dict[str, Any] = {}
+ account_name = _storage_account_name_from_host(conn.host)
+ # Preserve account_url for existing WASB, full URL, and custom endpoint
connections.
+ # ADLS Active Directory connections use login as client_id, so bare hosts
are account names.
+ if conn_type == "adls" and account_name:
+ options["account_name"] = account_name
+ elif conn_type != "adls" or conn.host or not tenant_id:
+ options["account_url"] = parse_blob_account_url(conn.host, conn.login)
Review Comment:
It seems `AzureBlobFileSystem` has no `account_url` parameter, it just falls
into `**kwargs`
([ref](https://github.com/fsspec/adlfs/blob/2023.10.0/adlfs/spec.py#L226-L252)).
Since `adls.rst` now says a full account URL can go in host, I'm afraid that
path raises an error from `do_connect()` unless `account_name` is also provided.
--
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]