-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Move BaseHook class to task SDK
#51873
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
Move BaseHook class to task SDK
#51873
Conversation
|
Green again finally!! |
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.
Let's create a GIthub issue to resolve Connection thing to have real sdk.Connection and for #51873 (comment) and #51873 (comment)
|
Thanks for the review @kaxil! Here are the issues which I will work on as follow ups: |
|
All of he AWS system tests have been failing since this commit merged. I reverted this one and #52766 locally to make sure and they pass with this reverted. I'm looking into it, but if any cause comes to mind, let me know. |
…OUND` Task SDK exception After apache#51873, the base hook's `get_connection` exception for when connection is not found was changed and was no longer being caught by `AwsGenericHook`. This change fixes that by using a robust approach. At some point, we should probably make the connection getter raise exceptions in a more consistent manner, maybe once we fully switch over to Task SDK.
|
The cause of this error was a change in the string representation of the exception after this PR was merged. In #52838, I changed it to a what seems like a more robust way of catching the "connection not found" exception. But I think at some point, we should probably make the connection getter raise exceptions in a more consistent manner (maybe once we fully switch over to Task SDK) so that callers of that method can have a simple try/except to handle the not found case |
Hey @ramitkataria what string representation changed? Could you elaborate a bit there? |
…OUND` Task SDK exception (#52838) After #51873, the base hook's `get_connection` exception for when connection is not found was changed and was no longer being caught by `AwsGenericHook`. This change fixes that by using a robust approach. At some point, we should probably make the connection getter raise exceptions in a more consistent manner, maybe once we fully switch over to Task SDK.
|
@amoghrajesh I have seen strange plugin initialization errors in https://apache-airflow.slack.com/archives/C06K9Q5G2UA/p1751744572678519 - is this related to this PR? |
|
@amoghrajesh Also antoher thing, maybe related? Started breeze on main via Is this related to this PR? Or shall I open a separate issue ticket? |
|
@jscheffl could be related. Can you please create issues(either for one for both)? I can only look on Monday, wont be around tomorrow |
|
closes: #51672
Moving the BaseHook class into task SDK, exactly where it should live similar to other base classes in sdk like notifiers, operators etc.
Testing: Running by all the methods defined on BaseHook -- old vs new
Running with the new path
DAG:
Running with the older path to check backcompat
^ 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.