GitHub user eflavio edited a discussion: clearTaskInstances REST endpoint on 
manually triggered dags with logical_date=None

Hello,

We are on airflow 3.1.3 and mostly trigger our dags via REST API and do not 
control logical_date (its None). 

When trying to clear multiple task instances between `start_date` and 
`end_date` using the API endpoint `/api/v2/dags/{dag_id}/clearTaskInstances`, 
we realized that these task instances are not found and therefore not cleared.
I had a look at the source code and airflow is indeed applying `start_date` and 
`end_date` filtering on the `logical_date` (which is None as described) 
(https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/serialization/serialized_objects.py#L3397)

Is this a bug? Should the filtering work on a different attribute if 
logical_date is None? Is the intended use to set the logical_date explicitely?

Thanks in advance!

GitHub link: https://github.com/apache/airflow/discussions/59297

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to