joelossher opened a new issue, #23546:
URL: https://github.com/apache/airflow/issues/23546
### Apache Airflow version
2.2.5
### What happened
After a task was deleted from a DAG we received the following message when
visiting the gantt view for the DAG in the webserver.
{
"detail": null,
"status": 404,
"title": "Task delete-me not found",
"type":
"https://airflow.apache.org/docs/apache-airflow/2.2.5/stable-rest-api-ref.html#section/Errors/NotFound"
}
This was only corrected by manually deleting the offending task instances
from the `task_instance` and `task_fail` tables.
### What you think should happen instead
I would expect the gantt chart to load either excluding the non-existent
task or flagging that the task associated with task instance no longer exists.
### How to reproduce
* Create a DAG with multiple tasks.
* Run the DAG.
* Delete one of the tasks.
* Attempt to open the gantt view for the DAG.
### Operating System
Debian GNU/Linux 11 (bullseye)
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other Docker-based deployment
### Deployment details
Custom docker container hosted on Amazon ECS.
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]