Skip to content

Fix Azure Data Factory hook broken with azure-mgmt-datafactory 10 - #69800

Merged
jason810496 merged 2 commits into
apache:mainfrom
FrankYang0529:airflow-azure-datafactory-10
Jul 15, 2026
Merged

Fix Azure Data Factory hook broken with azure-mgmt-datafactory 10#69800
jason810496 merged 2 commits into
apache:mainfrom
FrankYang0529:airflow-azure-datafactory-10

Conversation

@FrankYang0529

@FrankYang0529FrankYang0529 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Why

How

  • Use azure.mgmt.datafactory version to determine kwargs: _ADF_SDK_V10_PLUS is computed from the installed major and the hook's public if_match/if_none_match parameters are translated accordingly.
    • The v10+ sends etag + match_condition.
    • Older SDKs keep the original if_match/if_none_match kwargs.

Verification

  • uv run --project providers/microsoft/azure --with "azure-mgmt-datafactory==9.3.0" pytest providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py -q
  • uv run --project providers/microsoft/azure --with "azure-mgmt-datafactory==10.0.0" pytest providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py -q

Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code

  • 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.

@FrankYang0529
FrankYang0529force-pushed the airflow-azure-datafactory-10 branch from aafc189 to 16a5694CompareJuly 13, 2026 06:02
@FrankYang0529FrankYang0529 changed the title Adapt Azure Data Factory hook to azure-mgmt-datafactory 10Fix Azure Data Factory hook breakage with azure-mgmt-datafactory 10Jul 13, 2026
@FrankYang0529FrankYang0529 changed the title Fix Azure Data Factory hook breakage with azure-mgmt-datafactory 10Fix Azure Data Factory hook broken with azure-mgmt-datafactory 10Jul 13, 2026
@FrankYang0529
FrankYang0529 marked this pull request as ready for review July 13, 2026 08:24
Comment threadproviders/microsoft/azure/docs/index.rst
@FrankYang0529
FrankYang0529force-pushed the airflow-azure-datafactory-10 branch from 16a5694 to 4a38e38CompareJuly 13, 2026 12:06
@Lee-W

Copy link
Copy Markdown
Member

@eladkal I like this, but I'm not sure we've done something like this before. Increasing the minimum supported version from 2 to 10 seems a bit aggressive, so I suggested keeping it backward compatible.

eladkal
eladkal previously requested changes Jul 14, 2026

@eladkaleladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Temporary block till I take a closer look

@eladkal

Copy link
Copy Markdown
Contributor

OK, I reviewed the case and I think it's OK to support azure-mgmt-datafactory>=10 only.
I rather avoid overcomplicating the code unless we have clear indication that it's worth it.

The azure-mgmt-datafactory releases are not that frequent which is why we kept supporting old versions of it. Users of older versions can just use one version behind of the provider - should be perfectly fine.

@FrankYang0529 can you please adjust the code for that?

@FrankYang0529

Copy link
Copy Markdown
MemberAuthor

Thanks for the review. I will update it today.

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
FrankYang0529force-pushed the airflow-azure-datafactory-10 branch from 4a38e38 to ceafa4bCompareJuly 15, 2026 05:34
Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
FrankYang0529force-pushed the airflow-azure-datafactory-10 branch from ceafa4b to 0bdf13cCompareJuly 15, 2026 05:42
@FrankYang0529

Copy link
Copy Markdown
MemberAuthor

Updated it. Thank you.

@jason810496
jason810496 dismissed eladkal’s stale reviewJuly 15, 2026 11:25

Elad approve by comment.

@jason810496

Copy link
Copy Markdown
Member

OK, I reviewed the case and I think it's OK to support azure-mgmt-datafactory>=10 only.

Merging then, thanks.

@jason810496
jason810496 merged commit 43038e0 into apache:mainJul 15, 2026
95 checks passed
@FrankYang0529
FrankYang0529 deleted the airflow-azure-datafactory-10 branch July 15, 2026 11:26
joshuabvarghese pushed a commit to joshuabvarghese/airflow that referenced this pull request Jul 16, 2026
…ache#69800)
* Fix Azure Data Factory hook broken by azure-mgmt-datafactory 10
Signed-off-by: PoAn Yang <payang@apache.org>
* Fix Azure Data Factory hook broken by azure-mgmt-datafactory 10
Signed-off-by: PoAn Yang <payang@apache.org>
---------
Signed-off-by: PoAn Yang <payang@apache.org>
Sign up for freeto 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.

4 participants

@FrankYang0529@Lee-W@eladkal@jason810496