In airflow, if you add a new task to a dag and then clear its downstream task in an old dag run, airflow will first run the new task you just added.
For example:
A DAG was run on T: A >> B
On T+1 we added a new task C in the middle: A >> C >> B
Now if we don't do anything, and someone clears task B on T, then it will first trigger C, which is not something we want.
Currently we have a manual script to mark a new task as "success" in all historical dag runs, because we don't want the new task to trigger automatically when a downstream task is cleared. I am wondering if there is a less-manual solution to address this concern? It's quite annoying to manually mark success in historical dag runs every time we add a new task.