Honor async hook subclass overrides in get_async_connection#69140
Merged
Conversation
The async connection helper resolved connections 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. Accept the calling hook (instance or class) and dispatch through it, defaulting to BaseHook, and pass the hook instance from HttpAsyncHook so a custom subclass behaves the same in the triggerer as on the worker. The debug log now names the hook that actually resolved the connection. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
anxkhn
force-pushed
the
loop/airflow__002
branch
from
June 30, 2026 18:55
3a65843 to
f4e4553
Compare
Contributor
Author
|
Thanks for the review, all four addressed:
ruff, ruff-format, mypy, and the compat connection test module pass locally. |
dabla
approved these changes
Jul 1, 2026
Contributor
|
@anxkhn Check the ci/cd failure, yoiu need to add the |
…bump The http provider's common-compat lower bound was manually bumped to 1.16.0, which selective-checks rejects since only Release Managers set exact >= versions for provider dependencies. Restore the existing lower bound and mark it with '# use next version' so the dependency resolves correctly once common.compat's next release ships, per contributing-docs/13_airflow_dependencies_and_extras.rst. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
dabla
approved these changes
Jul 16, 2026
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jul 23, 2026
The http provider calls get_async_connection(hook=...), a parameter added by apache#69140 that has never been released. common.compat was left out of the wave, so the '# use next version' marker resolved to the already-published 1.16.0, whose signature does not accept it — installing http 6.0.5 alongside common-compat 1.16.0 raises TypeError in the triggerer. airbyte's only pending commit moves airbyte-api from the 0.x series to 1.x and stops installing requests, excluding every previously supported version of a hard dependency, which is a major bump rather than the patch it was given. Four more providers carried changelog sections that did not match the commits actually being released: cncf.kubernetes and apache.spark were each missing an entry, and sftp and ssh referenced the tracking issue instead of the merge request that shipped the change.
1 task
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jul 23, 2026
The http provider calls get_async_connection(hook=...), a parameter added by apache#69140 that has never been released. common.compat was left out of the wave, so the '# use next version' marker resolved to the already-published 1.16.0, whose signature does not accept it — installing http 6.0.5 alongside common-compat 1.16.0 raises TypeError in the triggerer. airbyte's only pending commit moves airbyte-api from the 0.x series to 1.x and stops installing requests, excluding every previously supported version of a hard dependency, which is a major bump rather than the patch it was given. Four more providers carried changelog sections that did not match the commits actually being released: cncf.kubernetes and apache.spark were each missing an entry, and sftp and ssh referenced the tracking issue instead of the merge request that shipped the change.
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jul 23, 2026
The http provider calls get_async_connection(hook=...), a parameter added by apache#69140 that has never been released. common.compat was left out of the wave, so the '# use next version' marker resolved to the already-published 1.16.0, whose signature does not accept it — installing http 6.0.5 alongside common-compat 1.16.0 raises TypeError in the triggerer. airbyte's only pending commit moves airbyte-api from the 0.x series to 1.x and stops installing requests, excluding every previously supported version of a hard dependency, which is a major bump rather than the patch it was given. Four more providers carried changelog sections that did not match the commits actually being released: cncf.kubernetes and apache.spark were each missing an entry, and sftp and ssh referenced the tracking issue instead of the merge request that shipped the change.
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jul 23, 2026
The http provider calls get_async_connection(hook=...), a parameter added by apache#69140 that has never been released. common.compat was left out of the wave, so the '# use next version' marker resolved to the already-published 1.16.0, whose signature does not accept it — installing http 6.0.5 alongside common-compat 1.16.0 raises TypeError in the triggerer. airbyte's only pending commit moves airbyte-api from the 0.x series to 1.x and stops installing requests, excluding every previously supported version of a hard dependency, which is a major bump rather than the patch it was given. Four more providers carried changelog sections that did not match the commits actually being released: cncf.kubernetes and apache.spark were each missing an entry, and sftp and ssh referenced the tracking issue instead of the merge request that shipped the change.
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Jul 23, 2026
The http provider calls get_async_connection(hook=...), a parameter added by apache#69140 that has never been released. common.compat was left out of the wave, so the '# use next version' marker resolved to the already-published 1.16.0, whose signature does not accept it — installing http 6.0.5 alongside common-compat 1.16.0 raises TypeError in the triggerer. airbyte's only pending commit moves airbyte-api from the 0.x series to 1.x and stops installing requests, excluding every previously supported version of a hard dependency, which is a major bump rather than the patch it was given. Four more providers carried changelog sections that did not match the commits actually being released: cncf.kubernetes and apache.spark were each missing an entry, and sftp and ssh referenced the tracking issue instead of the merge request that shipped the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get_async_connectionresolved the connection through the literalBaseHookclass, so a hook that overrides
aget_connection/get_connectionwas ignored inthe 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. Theasync path called the module helper, which hard-coded
BaseHook.aget_connectionand only took a
conn_id, so it could never see a subclass override. A user whosubclasses
HttpAsyncHookand overridesaget_connectionto injecthost/login/etc. gets correct fields on the worker but empty fields in the
triggerer.
This adds an optional
hookparameter so the helper dispatches through thecalling hook (defaulting to
BaseHook, so all existing callers are unchanged),and passes the hook from
HttpAsyncHook. Custom subclasses now behave the samein 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
mainandready for review.
closes: #66845
Was generative AI tooling used to co-author this PR?