Remove the ability to add hooks to airflow.hooks namespace#12108
Merged
ashb merged 4 commits intoapache:masterfrom Nov 6, 2020
Merged
Remove the ability to add hooks to airflow.hooks namespace#12108ashb merged 4 commits intoapache:masterfrom
ashb merged 4 commits intoapache:masterfrom
Conversation
mik-laj
reviewed
Nov 5, 2020
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
kaxil
reviewed
Nov 5, 2020
| "import_errors", | ||
| "hooks_modules", | ||
| "macros_modules", | ||
| "executors_modules", |
Member
There was a problem hiding this comment.
Should we remove executors in a different PR?
kaxil
approved these changes
Nov 5, 2020
|
The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it! |
Hooks do not need to live under "airflow.hooks" namespace for them to work -- so remove the ability to create them under there in plugins. Using them as normal python imports is good enough! We still allow them to be "registered" to support dynamically populating the connections list in the UI (which won't be done for 2.0) Closes apache#9507
312a216 to
6b5fee4
Compare
mik-laj
approved these changes
Nov 6, 2020
Member
Author
|
Deprecation warning for this added in #12133 |
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache#12108 - apache#9507
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As per my understand we don't use that code and instead use `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As per my understand we don't use that code and instead use `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
jedcunningham
pushed a commit
that referenced
this pull request
Oct 23, 2024
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As per my understand we don't use that code and instead use `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers. # Conflicts: # tests/plugins/test_plugin.py
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kaxil
added a commit
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in #12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
harjeevanmaan
pushed a commit
to harjeevanmaan/airflow
that referenced
this pull request
Oct 23, 2024
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache#12108 - apache#9507
harjeevanmaan
pushed a commit
to harjeevanmaan/airflow
that referenced
this pull request
Oct 23, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
PaulKobow7536
pushed a commit
to PaulKobow7536/airflow
that referenced
this pull request
Oct 24, 2024
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache#12108 - apache#9507
PaulKobow7536
pushed a commit
to PaulKobow7536/airflow
that referenced
this pull request
Oct 24, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
ellisms
pushed a commit
to ellisms/airflow
that referenced
this pull request
Nov 13, 2024
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache#12108 - apache#9507
ellisms
pushed a commit
to ellisms/airflow
that referenced
this pull request
Nov 13, 2024
We had removed registering hooks via plugin in apache#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers.
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
May 27, 2025
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache/airflow#12108 - apache/airflow#9507 GitOrigin-RevId: 5c683fb60a9f794a113e8d95d88d84fe3c878267
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
May 27, 2025
We had removed registering hooks via plugin in apache/airflow#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers. GitOrigin-RevId: 2bf3af0a65631bb6b9271fca8a0c6724c996393c
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Sep 22, 2025
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache/airflow#12108 - apache/airflow#9507 GitOrigin-RevId: 5c683fb60a9f794a113e8d95d88d84fe3c878267
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Sep 22, 2025
We had removed registering hooks via plugin in apache/airflow#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers. GitOrigin-RevId: 2bf3af0a65631bb6b9271fca8a0c6724c996393c
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Oct 20, 2025
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :) PRs: - apache/airflow#12108 - apache/airflow#9507 GitOrigin-RevId: 5c683fb60a9f794a113e8d95d88d84fe3c878267
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Oct 20, 2025
We had removed registering hooks via plugin in apache/airflow#12108 for Airflow 2.0. We kept it for registering Connection form. As I understand it, we don't use that code but `ProvidersManager` (`airflow/providers_manager.py`) to register Connections from providers. GitOrigin-RevId: 2bf3af0a65631bb6b9271fca8a0c6724c996393c
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.
Hooks do not need to live under "airflow.hooks" namespace for them to
work -- so remove the ability to create them under there in plugins.
Using them as normal python imports is good enough!
We still allow them to be "registered" to support dynamically populating
the connections list in the UI (which won't be done for 2.0)
Closes #9507
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.