Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Nov 5, 2020

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.

@github-actions
Copy link

github-actions bot commented 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*.

"import_errors",
"hooks_modules",
"macros_modules",
"executors_modules",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove executors in a different PR?

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Nov 5, 2020
@github-actions
Copy link

github-actions bot commented 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!

ashb added 3 commits November 6, 2020 09:20
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
@ashb ashb force-pushed the remove-importing-hooks-from-plugins branch from 312a216 to 6b5fee4 Compare November 6, 2020 09:20
@ashb
Copy link
Member Author

ashb commented Nov 6, 2020

Deprecation warning for this added in #12133

@ashb ashb merged commit bdcb6f8 into apache:master Nov 6, 2020
@ashb ashb deleted the remove-importing-hooks-from-plugins branch November 6, 2020 13:24
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
We had deprecated & removed support for Sensors & Operators via Plugin for Airflow 2 in Jun 25, 2020 :)

PRs:
- #12108
- #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.

# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:plugins full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ability to import hooks from plugins in 2.0.0

3 participants