uranusjr opened a new pull request, #28191: URL: https://github.com/apache/airflow/pull/28191
This fixes #28146. [According to random people on the Internet (the best knowledge source)](https://stackoverflow.com/questions/1412787/), this is caused by subtle import statement discrepencies, and we should find and fix the offending import statements, but I think we can probably agree it’s not practical to review all `Session` imports in the Airflow code base. As an alternative, I tried to fix this by not attempting to pickle any SQLAlchemy objects at all. Unfortunately SQLAlchemy does not really provide a good way to extract information from a Query object (most things are private), so the most barely reasonable way to approach this is to serialize the query into a SQL string, and rebuild a different query from that string to unpickle. Unfortunately it is impossible to use `count()` against such a Query (I don’t know why, SQLAlchemy just crashes with a very unhelpful exception), so we calculate that part eagerly. -- 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]
