anxkhn opened a new pull request, #69140:
URL: https://github.com/apache/airflow/pull/69140

   `get_async_connection` resolved the connection through the literal `BaseHook`
   class, so a hook that overrides `aget_connection`/`get_connection` was 
ignored in
   the triggerer even though the sync path honors it on the worker.
   
   The sync path dispatches through the instance: provider hooks call
   `self.get_connection(...)` (e.g. `HttpHook`), so a subclass override wins. 
The
   async path called the module helper, which hard-coded 
`BaseHook.aget_connection`
   and only took a `conn_id`, so it could never see a subclass override. A user 
who
   subclasses `HttpAsyncHook` and overrides `aget_connection` to inject
   host/login/etc. gets correct fields on the worker but empty fields in the
   triggerer.
   
   This adds an optional `hook` parameter so the helper dispatches through the
   calling hook (defaulting to `BaseHook`, so all existing callers are 
unchanged),
   and passes the hook from `HttpAsyncHook`. Custom subclasses now behave the 
same
   in the triggerer as on the worker.
   
   This reopens the fix from #67440, which was closed only as inactive-draft
   housekeeping (not on its merits); this PR is rebased on the latest `main` and
   ready for review.
   
   closes: #66845
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [ ] Yes (please specify the tool below)
   


-- 
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]

Reply via email to