anxkhn commented on PR #69140: URL: https://github.com/apache/airflow/pull/69140#issuecomment-4853587156
Thanks for the review, all four addressed: 1. Log message: both branches now log the actual resolving hook via `%s`. I compute the name as `hook.__name__ if isinstance(hook, type) else type(hook).__name__` rather than a bare `hook.__name__`, since points 2 and 3 let `hook` be an instance and a bare `.__name__` would raise on instances. 2. Typing: widened to `BaseHook | type[BaseHook] | None`. 3. `type(self)` -> `self`: switched to `self`; the helper handles an instance throughout, and passing the instance preserves instance-specific behavior, which is the worker/triggerer parity this PR is after. 4. Added `test_get_async_connection_honors_passed_hook_get_connection`, mirroring the async one; it exercises the `sync_to_async` branch and fails without the fix. ruff, ruff-format, mypy, and the compat connection test module pass locally. -- 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]
