Add a standard toggle for resumability to ResumableJobMixin#68623
Merged
amoghrajesh merged 10 commits intoJun 23, 2026
Conversation
Contributor
Author
|
Converting to draft as I am unsure if this is the best solution. |
ashb
reviewed
Jun 18, 2026
ashb
left a comment
Member
There was a problem hiding this comment.
It's probably worth mentioning :param durable: etc in the doc string of SparkSubmitOperator explicitly?
LGTM I think, but lets get @vikramkoka and @kaxil's view on this.
Contributor
Author
Yes it is, mentioned it in handling comments from ash |
(cherry picked from commit 546469d70ec3efc373bfa1d73c2f8d8d79b5cd03)
75 tasks
kaxil
approved these changes
Jun 22, 2026
cetingokhan
pushed a commit
to cetingokhan/airflow
that referenced
this pull request
Jun 24, 2026
15 tasks
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?
Why
ResumableJobMixinhad no standard on/off switch for crash recovery. WhenSparkSubmitOperatorwasported to resumability, I added a
reconnect_on_retryparameter, but any future resumable operatorwould need to invent their own name — making the flag inconsistent across operators and impossible to
measure uniformly.
What changed
ResumableJobMixinnow ownsdurable: bool = Truein its own__init__, decorated with@BaseOperatorMeta._apply_defaults. Operators that inherit(ResumableJobMixin, BaseOperator)getthe flag for free — no redeclaration needed,
default_argsinjection and.partial()workautomatically.
False,execute_resumable()skips alltask_state_storeinteraction and runs a plainsubmit/poll/result cycle.
SparkSubmitOperator.reconnect_on_retryis renamed todurable. The per-mode if/else branching inexecute()is removed and all three tracking paths (standalone, K8s, YARN) now callexecute_resumable(context)directly.reconnect_on_retryis kept as a deprecated alias for backcompat with 6.1.0 — passing it raises anAirflowProviderDeprecationWarningand maps todurable.Impact on operators using resumability
No behavior change.
durabledefaults toTrue, so crash recovery is on by default exactly as before.How to opt out
Set
durable=Falseon the task:Or via
default_argsto disable for all tasks in a DAG:Implementation note
ResumableJobMixin.__init__is decorated directly with@BaseOperatorMeta._apply_defaults. Whensuper().__init__(**kwargs)reaches the mixin,apply_defaultsfires, seesdurablein thesignature, and injects it from
default_argsif not explicitly set. Operators just need(ResumableJobMixin, BaseOperator)ordering andsuper().__init__(**kwargs).{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.