Skip to content

Conversation

@OscarLigthart
Copy link
Contributor

@OscarLigthart OscarLigthart commented Dec 23, 2025

Context

The ability to clear newly introduced tasks in an already existing DAG run seems not to have been added to Airflow 3 yet.

image

The button in the UI is disabled at all times.

Implementation

In this PR I try to start with the basic requirement, which is to add functionality to the dag.clear() function that ensures only newly added tasks are cleared.

Questions to Reviewer

  • I'm not sure if the use of DagBag is appropriate here. It works, but I am not as familiar with best practices in Airflow as I would like to be yet. I'm also not fully aware of how this was implemented in Airflow 2, and since I'm touching core Airflow things here, please let me know if there's anything off about my approach. Would love to learn more!
  • Are there any existing plans to add this back that we can align on? I see there is an argument run_on_latest_version, but I am unsure of its purpose. I've seen it's experimental and I wonder if it is at all involved with the issue attached to this PR.

Issue

See below the related issues.

related: #57051
related: #56250


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Sign up for free to 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.

1 participant