-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Remove backcompat inheritance for DbApiHook #35754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove backcompat inheritance for DbApiHook #35754
Conversation
| """ | ||
|
|
||
|
|
||
| # In case we are running it on Airflow 2.4+, we should use BaseHook, but on Airflow 2.3 and below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a mighty hack !
| if "jwt__file" in extra: | ||
| with open(extra.get("jwt__file")) as jwt_file: | ||
| token = jwt_file.read() | ||
| if not exactly_one(jwt_file := "jwt__file" in extra, jwt_token := "jwt__token" in extra): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason we have those changes ? They look unrelated to 2.4 compatibility removal. Should we separate it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They look unrelated to 2.4 compatibility removal.
After change inheritance this block of code do not pass static checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was the way to fix it by different way, however I preferred to add additional validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. No problem then.
* Remove backcompat inheritance for DbApiHook * jwt_file > jwt__file * simplify trino test
* Remove backcompat inheritance for DbApiHook * jwt_file > jwt__file * simplify trino test
Follow-up: #35727, #35752
Remove inheritance from backcompat classes and fix static checks
^ 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 newsfragments.