potiuk commented on code in PR #68344:
URL: https://github.com/apache/airflow/pull/68344#discussion_r3887008965
##########
providers/microsoft/azure/tests/unit/microsoft/azure/fs/test_adls.py:
##########
@@ -141,6 +139,126 @@ def mocked_blob_file_system():
"account_key": "password",
},
),
+ (
+ Connection(
+ conn_id="testconn",
+ conn_type="adls",
+ host="testaccountname",
+ login="client_id",
+ password="client_secret",
+ extra={
+ "tenant_id": "tenant_id",
+ },
+ ),
+ {
+ "account_name": "testaccountname",
+ "client_id": "client_id",
+ "client_secret": "client_secret",
+ "tenant_id": "tenant_id",
+ },
+ ),
+ (
+ # A mixed-case bare host is still an account name; urlparse
lowercases it.
+ Connection(
+ conn_id="testconn",
+ conn_type="adls",
+ host="MyAccount",
+ login="client_id",
+ password="client_secret",
+ extra={
+ "tenant_id": "tenant_id",
+ },
+ ),
+ {
+ "account_name": "myaccount",
+ "client_id": "client_id",
+ "client_secret": "client_secret",
+ "tenant_id": "tenant_id",
+ },
+ ),
+ (
+ Connection(
+ conn_id="testconn",
+ conn_type="adls",
+ host="testaccountname",
+ password="account_key",
+ extra={},
+ ),
+ {
+ "account_name": "testaccountname",
+ "account_key": "account_key",
+ },
+ ),
+ (
+ Connection(
+ conn_id="testconn",
+ conn_type="adls",
+ host="testaccountname.dfs.core.windows.net",
+ login="client_id",
+ password="client_secret",
+ extra={
+ "tenant_id": "tenant_id",
+ },
+ ),
+ {
+ "account_url": "https://testaccountname.dfs.core.windows.net",
+ "client_id": "client_id",
+ "client_secret": "client_secret",
+ "tenant_id": "tenant_id",
+ },
+ ),
+ (
+ Connection(
+ conn_id="testconn",
+ conn_type="adls",
+ host="https://custom.blob.core.mydomain.io",
+ login="client_id",
+ password="client_secret",
+ extra={
+ "tenant_id": "tenant_id",
+ },
+ ),
+ {
+ "account_url": "https://custom.blob.core.mydomain.io",
Review Comment:
This case asserts `account_url` is produced, but adlfs never reads it —
`AzureBlobFileSystem.__init__` has no such parameter, so it lands in `**kwargs`
and is discarded, and adlfs computes its own `self.account_url` from
`account_host`/`account_name` (giving `https://None.blob.core.windows.net` when
`account_name` is unset).
So this case passes while pinning a runtime no-op. Either drop it, or make
it an `account_host` case — that field is a real adlfs parameter, is already
carried through the extras overlay, and is what the new docs point users at.
---
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
--
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]