This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 683fbd4 Fix Clear task instances endpoint resets all DAG runs bug (#17961) 683fbd4 is described below commit 683fbd49d7873edd90632926e15d51d970aa00fb Author: Yash Dodeja <yashdod...@yahoo.com> AuthorDate: Wed Sep 1 23:15:36 2021 +0530 Fix Clear task instances endpoint resets all DAG runs bug (#17961) --- airflow/api_connexion/endpoints/task_instance_endpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/api_connexion/endpoints/task_instance_endpoint.py b/airflow/api_connexion/endpoints/task_instance_endpoint.py index 2575314..e2a6ce9 100644 --- a/airflow/api_connexion/endpoints/task_instance_endpoint.py +++ b/airflow/api_connexion/endpoints/task_instance_endpoint.py @@ -252,7 +252,7 @@ def post_clear_task_instances(dag_id: str, session=None): task_instances = dag.clear(dry_run=True, dag_bag=current_app.dag_bag, **data) if not dry_run: clear_task_instances( - task_instances, session, dag=dag, dag_run_state=State.RUNNING if reset_dag_runs else False + task_instances.all(), session, dag=dag, dag_run_state=State.RUNNING if reset_dag_runs else False ) task_instances = task_instances.join( DR, and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date)