PrincipalsOffice opened a new issue #20248: URL: https://github.com/apache/airflow/issues/20248
### Apache Airflow version 2.2.2 (latest released) ### What happened Calling the `Dag.get_task_instances()` method would result in a sqlalchemy warning `sqlalchemy.exc.SAWarning: Pathed join target TaskInstance.dag_run has already been joined to; skipping`. This is because the query is trying to `.join(TaskInstance.dag_run)` twice. Once here https://github.com/apache/airflow/blob/main/airflow/models/dag.py#L1373 then again here https://github.com/apache/airflow/blob/main/airflow/models/dag.py#L1452 ### What you expected to happen No warning. ### How to reproduce _No response_ ### Operating System Debian GNU/Linux ### Versions of Apache Airflow Providers _No response_ ### Deployment Other Docker-based deployment ### Deployment details _No response_ ### 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]
