Skip to content

Reconnect Azure Data Factory pipelines on task retry - #72399

Closed
1fanwang wants to merge 1 commit into
apache:mainfrom
1fanwang:adf-resumable-retry
Closed

1fanwang wants to merge 1 commit into
apache:mainfrom
1fanwang:adf-resumable-retry

Conversation

@1fanwang

@1fanwang 1fanwang commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

A worker exit during a synchronous Data Factory wait can cause the retry to submit a second Azure pipeline while the first is still running. Retries now reconnect to active runs, recover completed runs, and replace only failed, canceled, or missing runs.

This applies AIP-103's ResumableJobMixin to synchronous waits. The operator stores the Azure run ID before polling and restores its run_id XCom before checking Azure. Deferrable and non-waiting execution are unchanged. durable=False keeps the previous behavior; Airflow versions before 3.3 keep it automatically.

Testing

Scenario Result
Worker exits during a synchronous wait Retry reconnects; Azure receives one submission
Persisted Azure run is gone Retry submits and stores a replacement

Regression proof:

Raw proof
git checkout upstream/main -- providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/data_factory.py
breeze run pytest providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_data_factory.py::TestAzureDataFactoryRunPipelineOperatorResumable::test_retry_reconnects_to_first_submission -xvs
E   AssertionError: Expected 'run_pipeline' to have been called once. Called 2 times.
======================== 1 failed, 1 warning in 22.34s =========================

git checkout HEAD -- providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/data_factory.py
breeze run pytest providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_data_factory.py::TestAzureDataFactoryRunPipelineOperatorResumable::test_retry_reconnects_to_first_submission -xvs
======================== 1 passed, 1 warning in 20.15s =========================

breeze run pytest providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_data_factory.py -xvs
======================== 43 passed, 1 warning in 21.73s ========================

breeze testing providers-tests --test-type "Providers[microsoft.azure]"
============== 1053 passed, 1 xfailed, 86 warnings in 91.99s ==============

Hygiene

Provider mypy and both prek stages passed.


Was generative AI tooling used to co-author this PR?
  • Yes: GitHub Copilot CLI (GPT-5.6 Sol)

Generated-by: GitHub Copilot CLI (GPT-5.6 Sol) following the guidelines


Synchronous pipeline retries currently submit another Azure run after worker crashes. Persisting the run ID lets retries resume active runs, recover completed runs, and replace failed or missing runs.

Generated-by: GitHub Copilot CLI (GPT-5.6 Sol)
Signed-off-by: 1fanwang <[email protected]>
@potiuk

potiuk commented Sep 25, 2026

Copy link
Copy Markdown
Member

Hello @1fanwang - thank you for your contributions to Apache Airflow!

The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 34 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:

These pull requests stay open because maintainers are already engaged in them - they count towards your limit:

This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are.

What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or gh pr reopen <PR_NUMBER> --repo apache/airflow. Reopen the ones you are ready to follow through - keep them rebased, respond to review comments and fix failing checks.

While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack.

Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

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

Labels

area:providers closed because of open PR limit Closed as a one-time step of introducing the open pull request limit provider:microsoft-azure Azure-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants