Skip to content

Use DefaultAzureCredential by default (#497)#550

Open
janjagusch wants to merge 1 commit intodrivendataorg:masterfrom
janjagusch:feat/default-azure-credential
Open

Use DefaultAzureCredential by default (#497)#550
janjagusch wants to merge 1 commit intodrivendataorg:masterfrom
janjagusch:feat/default-azure-credential

Conversation

@janjagusch
Copy link

@janjagusch janjagusch commented Feb 27, 2026

Summary

  • When account_url is provided without credential, automatically uses DefaultAzureCredential from azure-identity if installed (falls back to credential=None if not installed)
  • Adds support for AZURE_STORAGE_ACCOUNT_URL environment variable as a new fallback before raising MissingCredentialsError, mirroring the existing AZURE_STORAGE_CONNECTION_STRING pattern
  • Fixes minor docstring typos (""AZURE_STORAGE_CONNECTION_STRING" and raised raised)

Closes #497

Test plan

  • Existing test_azureblobpath_nocreds updated to also clear AZURE_STORAGE_ACCOUNT_URL env var
  • New test: DefaultAzureCredential used when account_url provided without credential
  • New test: explicit credential takes precedence over DefaultAzureCredential
  • New test: fallback to credential=None when azure-identity not installed
  • New test: AZURE_STORAGE_ACCOUNT_URL env var with .blob. URL
  • New test: AZURE_STORAGE_ACCOUNT_URL env var with .dfs. URL
  • New test: MissingCredentialsError still raised with no config
  • All 13 tests in test_azure_specific.py pass
  • All 16 tests in test_local.py pass

🤖 Generated with Claude Code

@janjagusch janjagusch force-pushed the feat/default-azure-credential branch 2 times, most recently from 03ea50f to e23d7e5 Compare February 27, 2026 21:32
…provided

When `account_url` is provided without `credential`, automatically use
`DefaultAzureCredential` from `azure-identity` if installed, bringing
Azure auth in line with how `GSClient` uses `google.auth.default()`.
Also adds support for `AZURE_STORAGE_ACCOUNT_URL` env var as a fallback.

Closes drivendataorg#497

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@janjagusch janjagusch force-pushed the feat/default-azure-credential branch from e23d7e5 to fafa0b7 Compare February 27, 2026 21:34
@janjagusch janjagusch marked this pull request as ready for review February 27, 2026 21:38
@janjagusch
Copy link
Author

@pjbull, hope you don't mind this agent-written PR. I reviewed the changes myself, making sure the diff remains minimal and plausible, and the changes look good to me. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use DefaultAzureCredential by default for Azure paths

1 participant