Repository navigation
Support durable execution in Databricks task operators - #76295
Merged
amoghrajesh merged 8 commits intoNov 16, 2026
Merged
amoghrajesh merged 8 commits into
amoghrajesh merged 8 commits into
Conversation
amoghrajesh
requested review from
jroachgolf84,
kaxil,
pankajastro and
vikramkoka
November 2, 2026 11:41
jroachgolf84
reviewed
Nov 2, 2026
kaxil
reviewed
Nov 2, 2026
kaxil
force-pushed
the
durable-execution-databricks-taskbaseoperator
branch
from
November 4, 2026 01:51
d983bdf to
96ec193
Compare
amoghrajesh
force-pushed
the
durable-execution-databricks-taskbaseoperator
branch
from
November 4, 2026 05:57
96ec193 to
61cb957
Compare
kaxil
reviewed
Nov 4, 2026
1 task
kaxil
reviewed
Nov 9, 2026
kaxil
approved these changes
Nov 15, 2026
Contributor
Author
|
Thnx for detailed reviews, merging this one. |
amoghrajesh
deleted the
durable-execution-databricks-taskbaseoperator
branch
November 16, 2026 04:55
1 task done
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was generative AI tooling used to co-author this PR?
DatabricksNotebookOperatorandDatabricksTaskOperatornow reconnect to a run they already submitted instead of submitting a new one after a worker crash.Before this change, a worker that died during the poll loop left the Databricks run executing with no Airflow task watching it, and the retry called
runs/submitagain. Two runs, two bills, one of them orphaned.DatabricksSubmitRunOperatorandDatabricksRunNowOperatoralready guard against this throughResumableJobMixin; these two did not.DatabricksTaskBaseOperatornow mixes inResumableJobMixinand implements the six hooks it needs. The run id goes to the task state store before polling starts, so on retry the operator asks Databricks about the storedrun and either reconnects to it, returns early if it already succeeded, or submits fresh if it failed terminally.
Scope
Only the standalone path. Inside a
DatabricksWorkflowTaskGroupthe run is submitted by the.launchtask and the run id reaches each leaf through xcom, so a retry already reconnects to the shared run. That branch ofexecute()keeps its existing behaviour, and a test pins it.Two sentences in
notebook.rstandtask.rstclaimed that "each retry submits a new Databricks run" for a standalone operator. Both now describe what the operator does.Compatibility
durabledefaults toTrue, so existing Dags pick up reconnection with no change. Passdurable=Falseto keep submitting a new run on every retry.On Airflow below 3.3 the
common.compatstand-in takes over and the operators behave as they did before, since the task state store does not exist there. The provider already imports the mixin throughcommon.compat.sdk, so nothing new enters the dependency surface.Testing
Using this Dag:
For both the tasks try 1:
Killed the worker right after
State store for both:
Try 2 for both
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines
{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.