I am trying to bulk clear a list of task instances returned by taskinstance/list page.
However, the clearing was not successful due to the following error
Failed to clear task instances: "'NoneType' object has no attribute 'partial_subset'"
I think the issue was some of the task instances returned in that page (along with their associated dags) no longer exist. Therefore, when we try to call partial_subset on these dags (code), the code fails and the exception is caught here this.
The result of this is that the task instances I want to clear and do still exist ended up not getting cleared.
What you think should happen instead?
I think we should add a try catch block in _clear_task_instanceshere
How to reproduce
You can try to clear a task instance whose dag no longer exist in the List Task Instance UI page.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.8.4
What happened?
I am trying to bulk clear a list of task instances returned by
taskinstance/list
page.However, the clearing was not successful due to the following error
I think the issue was some of the task instances returned in that page (along with their associated dags) no longer exist. Therefore, when we try to call
partial_subset
on these dags (code), the code fails and the exception is caught here this.The result of this is that the task instances I want to clear and do still exist ended up not getting cleared.
What you think should happen instead?
I think we should add a try catch block in
_clear_task_instances
hereHow to reproduce
You can try to clear a task instance whose dag no longer exist in the List Task Instance UI page.
Operating System
NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)"
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct