Skip to content

fix(test_wasb.py): SAS token tests failing with azure-storage-blob 12.30.0#68490

Merged
potiuk merged 3 commits into
apache:mainfrom
FrankYang0529:airflow-68482
Jun 13, 2026
Merged

fix(test_wasb.py): SAS token tests failing with azure-storage-blob 12.30.0#68490
potiuk merged 3 commits into
apache:mainfrom
FrankYang0529:airflow-68482

Conversation

@FrankYang0529

Copy link
Copy Markdown
Member

test_sas_token_connection fails on azure-storage-blob==12.30.0: the test fixtures passed fake SAS tokens that get appended as a URL path segment, and 12.30.0 no longer echoes the path back in BlobServiceClient.url for known
*.blob.core.windows.net hosts (it builds the URL from the netloc only).

A SAS token is a query string, not a path. The old assertion only passed because the previous SDK reflected the path back in .url. This switches the fixtures to a realistic SAS token / SAS URL and asserts the token lands in the URL query string, which is stable across SDK versions.

closes: #68482

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude Code with Opus 4.8] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

….30.0

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529 FrankYang0529 marked this pull request as draft June 13, 2026 00:21
@Lee-W Lee-W self-requested a review June 13, 2026 00:22
@FrankYang0529 FrankYang0529 marked this pull request as ready for review June 13, 2026 00:57
Comment thread providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_wasb.py Outdated

@Lee-W Lee-W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution here is not wrong. But I think https://github.com/apache/airflow/pull/68486/changes is a better design (rely on SDK)

Comment thread providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_wasb.py Outdated
Signed-off-by: PoAn Yang <payang@apache.org>
@potiuk potiuk merged commit e5bf1e3 into apache:main Jun 13, 2026
81 checks passed
@FrankYang0529 FrankYang0529 deleted the airflow-68482 branch June 13, 2026 14:24
pgagnon pushed a commit to pgagnon/airflow that referenced this pull request Jun 15, 2026
….30.0 (apache#68490)

* fix(test_wasb.py): SAS token tests failing with azure-storage-blob 12.30.0

Signed-off-by: PoAn Yang <payang@apache.org>

* refactor: add SAS link and update test_sas_token_connection assertion

Signed-off-by: PoAn Yang <payang@apache.org>

* test: assert sas_token in conn.url

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Jun 16, 2026
….30.0 (apache#68490)

* fix(test_wasb.py): SAS token tests failing with azure-storage-blob 12.30.0

Signed-off-by: PoAn Yang <payang@apache.org>

* refactor: add SAS link and update test_sas_token_connection assertion

Signed-off-by: PoAn Yang <payang@apache.org>

* test: assert sas_token in conn.url

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
dingo4dev pushed a commit to dingo4dev/airflow that referenced this pull request Jun 16, 2026
….30.0 (apache#68490)

* fix(test_wasb.py): SAS token tests failing with azure-storage-blob 12.30.0

Signed-off-by: PoAn Yang <payang@apache.org>

* refactor: add SAS link and update test_sas_token_connection assertion

Signed-off-by: PoAn Yang <payang@apache.org>

* test: assert sas_token in conn.url

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
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.

WasbHook test_sas_token_connection fails with azure-storage-blob==12.30.0

5 participants