Skip to content

Document how clearing tasks works with task state store on durable operators - #71358

Merged
amoghrajesh merged 2 commits into
apache:mainfrom
astronomer:document-clear-behaviour-resumable-tasks-providers
Aug 12, 2026
Merged

Document how clearing tasks works with task state store on durable operators#71358
amoghrajesh merged 2 commits into
apache:mainfrom
astronomer:document-clear-behaviour-resumable-tasks-providers

Conversation

@amoghrajesh

@amoghrajesh amoghrajesh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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

Same as #71356 but for providers.

Clearing a task whose external job already succeeded returns without resubmitting, since state store rows survive a clear. Rather than duplicate the explanation per operator, each doc gets a one-line pointer to the shared core-concepts writeup, plus the clear_on_success setting that restores "clearing always resubmits."

Touches SparkSubmitOperator, RedshiftDataOperator, DatabricksRunNowOperator, DatabricksSubmitRunOperator, and SnowflakeSqlApiOperator.


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

@amoghrajesh amoghrajesh changed the title Document how clearing tasks works with task state store on durable op… Document how clearing tasks works with task state store on durable operators Aug 10, 2026
@amoghrajesh amoghrajesh self-assigned this Aug 10, 2026

@uros-b uros-b 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.

@amoghrajesh Please note that the PR title got cut-off mid word:

Document how clearing tasks works with task state store on durable operators

@jason810496 jason810496 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.

How about waiting for #71356 (review) discussion first before landing into each providers.

Additionally, would it make sense to add the prek script with <-- auto sync by ... --> like marker to prevent drift?

@Lee-W

Lee-W commented Aug 11, 2026

Copy link
Copy Markdown
Member

agree we can wait for another PR to be merged. but I don't think we really need a prek hook for that. overkill IMO

@amoghrajesh

Copy link
Copy Markdown
Contributor Author

Yeah I think we don't need a prek hook - seems like an overkill.

@amoghrajesh

Copy link
Copy Markdown
Contributor Author

@amoghrajesh Please note that the PR title got cut-off mid word:

Document how clearing tasks works with task state store on durable operators

Thanks for letting me know, thanks!

@jason810496 jason810496 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.

How about mentioning something like "we're only able to reconnect back to the external job if it's deferred task deferrable=True, see more in ... <link to the core docs that we just settled in #71356 >"?

@amoghrajesh

Copy link
Copy Markdown
Contributor Author

Added. Each doc now says explicitly that reconnect-on-clear is most reliable for deferred tasks (deferrable=True), since clearing an actively-polling synchronous task can cancel the job via on_kill before the next attempt gets a chance to reconnect. Links to the caveat in core-concepts/resumable-tasks (from #71356).

@amoghrajesh

Copy link
Copy Markdown
Contributor Author

@jason810496 @uros-b I added the reference and suggestion as suggested. Can you take a look?

@jason810496 jason810496 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.

Thanks for the update.

@amoghrajesh
amoghrajesh merged commit b099814 into apache:main Aug 12, 2026
69 checks passed
@amoghrajesh
amoghrajesh deleted the document-clear-behaviour-resumable-tasks-providers branch August 12, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants