Repository navigation
Check for Deprecated SQLA Query Class Usage in Prevent Deprecated SQLA Hook - #55274
Conversation
|
I noticed the I’ll be more careful next time—sorry about that! |
|
@potiuk , Could you please let me know if there are any other deprecated query forms I should add? This seems to be another deprecated pattern, since it's using |
|
Hmm, I don't think there's anything I can add beyond what's written in the SQLA migration docs on this subject. Perhaps try feeding the current hook implementation along with the full migration doc into a large-context LLM (like gemini) and asking for suggestions? |
|
Here's what Gemini had to say:
|
|
It seems like these are also deprecated query patterns, and I need to add filters for them |
8d71248 to
090779a
Compare
These have existed for a while so we definitely need them (I double checked and we use them). We are currently in the process of upgrading Flask-appbuilder to 5 in #50960. If you look at the PR, we no longer need |
090779a to
57e55de
Compare
11c7802 to
2375285
Compare
|
Oops, I'm resolving the conflicts. |
2375285 to
c6e63bf
Compare
|
Oops! A few changes need fixing — I’ll sort them out soon |
9dce01e to
84f249c
Compare
|
Thanks @Dev-iL ! |
…A Hook (apache#55274) * add conditions for query class in ast.tree * Remove Query class * remove Query obj from dagrun.py * resolve conflicts * re-added import that was mistakenly deleted * remove Query from type-hint * fixing static checks
This PR is part of the migration to SQLAlchemy 2.0
Previously, the hook only detected usage of
.query()which returns aQueryobject.This update extends the check to also flag direct usage of the deprecated
Queryclass itself^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.