PrincipalsOffice opened a new issue #20116: URL: https://github.com/apache/airflow/issues/20116
### Apache Airflow version 2.2.2 (latest released) ### What happened I was trying to call `task.get_task_instances()` but received an error `sqlalchemy.exc.ArgumentError: SQL expression object expected, got object of type <class 'sqlalchemy.ext.associationproxy.ColumnAssociationProxyInstance'> instead`. Looking at the code, it's trying to query `TaskInstance.execution_date` which is no longer a column. https://sourcegraph.com/github.com/apache/airflow@944dcfb/-/blob/airflow/models/baseoperator.py?L1252:21 ### What you expected to happen Perhaps the query should compare `TaskInstance.start_date` against start_date and `TaskInstance.end_date` against end_date instead? ### How to reproduce Create a dag with random tasks, get one of the tasks, then call `task.get_task_instances(...)`. ### 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? - [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]
