OscarLigthart opened a new pull request, #59764: URL: https://github.com/apache/airflow/pull/59764
## Context The ability to clear newly introduced tasks in an already existing DAG run seems not to have been added to Airflow 3 yet. <img width="889" height="459" alt="image" src="https://github.com/user-attachments/assets/d86698ed-3a2f-4515-a4fd-18fc7f693df4" /> 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. Since I'm touching core Airflow things here, please let me know what's 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 it's 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 issue. related: #57051 <!-- Please keep an empty line above the dashes. --> --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). 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](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
