-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
3.0.3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
#47036 included a validation that raises an exception when a clear instance call is made with the dag_run_id defined.
The problem comes when you try to do one of the most common re-run scenario using the web UI: Clear Task Instance for future and/or downstream. You can't, because selecting the task automatically adds a dag_run_id to the request if I'm not wrong.
The re-run tasks documentation says that this is the way to proceed for re-running tasks:
Past - All the instances of the task in the runs before the DAG’s most recent data interval
Future - All the instances of the task in the runs after the DAG’s most recent data interval
Now it forces you to clear the dags one by one, instead of let airflow calculate all the necessary tasks to be cleared.
What you think should happen instead?
The moment you click on the Past or Future buttons on the Clear Task Instance dialog, it says "Non Task Instances found.", digging into the network requests, I can see the following error on the endpoint api/v2/dags/my_dag_name/clearTaskInstances:
{
"detail": "Cannot use include_past or include_future when dag_run_id is provided because logical_date is not applicable."
}
I would expect to behave as it does on Airflow 2 versions, populating the list with the future/past affected tasks to be able to clear and re-run them.
How to reproduce
Using the basic DAG from the documentation, do a backfill for a few days or wait until you have some runs.
- Go to the web UI and open the DAG
- Click on a task from which we want to rerun
- Click on Clear Task Instance
- Click on Future or Past (depending if you have future or pasts tasks to be cleared, doesn't matter both generates the same issue)
Operating System
Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct