cmarteepants opened a new issue, #38329: URL: https://github.com/apache/airflow/issues/38329
### Apache Airflow version 2.8.3 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? Receive a 500 Internal server error when accessing task instance logs for tasks that are no longer part of the current DAG structure. ### What you think should happen instead? We should properly retrieve the logs for these types of tasks. ### How to reproduce 1. Create a DAG with 6 Tasks and run them - all is fine:  2. Remove 2 tasks - they do not appear in the Grid View (expected):  3. Go to `taskinstance/list/` pane - Task Instances for removed tasks are still present (expected):  4. Access the removed tasks to see the logs - logs never load. Via Chrome dev tools, I can see a generic error:   Webserver logs show exact python exception:  ### Operating System Debian GNU/Linux 11 (bullseye) ### Versions of Apache Airflow Providers _No response_ ### Deployment Astronomer ### Deployment details N/A ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] 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]
