Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updating account url for WasbHook #33457

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

ephraimbuddy
Copy link
Contributor

There are different ways users supply the hostname(account url) in Azure, sometimes the host doesn't have a urlparse.scheme but has urlparse.path e.g. name.blob.windows.net and other times, it will just be Azure ID e.g. aldhjf9dads. While working on #32980, I assumed that if there's no scheme, then the hostname is not valid, that's incorrect since DNS can serve as the host.
The fix was to check if we don't have netloc and that urlparse.path does not include a dot and if it does not, use the login/account_name to construct the account_url

Closes: #33203

There are different ways users supply the hostname(account url) in azure,
sometimes the host doesn't have a urlparse.scheme but has urlparse.path e.g name.blob.windows.net
and other times, it will just be Azure ID e.g aldhjf9dads.
While working on apache#32980, I assumed that if there's no scheme, then the hostname is not valid, that's
incorrect since DNS can serve as the host.
The fix was to check if we don't have netloc and that urlparse.path does not include a dot and if it does not, use the login/account_name to construct
the account_url
@ephraimbuddy ephraimbuddy force-pushed the fix-azure-account-url branch from 6e84479 to 5f78b24 Compare August 17, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider apache-airflow-providers-microsoft-azure no longer==6.2.3 expose account_name
4 participants