-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Deprecate adding Operators and Sensors via plugins #12069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ashb
merged 1 commit into
apache:v1-10-stable
from
astronomer:deprecate-operators-via-plugins
Nov 5, 2020
Merged
Deprecate adding Operators and Sensors via plugins #12069
ashb
merged 1 commit into
apache:v1-10-stable
from
astronomer:deprecate-operators-via-plugins
Nov 5, 2020
Conversation
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
kaxil
reviewed
Nov 3, 2020
kaxil
approved these changes
Nov 3, 2020
kaxil
reviewed
Nov 3, 2020
a5b4369 to
636a2f5
Compare
kaxil
approved these changes
Nov 3, 2020
kaxil
pushed a commit
to astronomer/airflow
that referenced
this pull request
Nov 4, 2020
We have deprecated this in apache#12069 (for inclusion in 1.10.13) and the docs http://airflow.apache.org/docs/stable/howto/custom-operator.html already show how to do this without a plugin. Closes apache#9498
kaxil
pushed a commit
that referenced
this pull request
Nov 4, 2020
We have deprecated this in #12069 (for inclusion in 1.10.13) and the docs http://airflow.apache.org/docs/stable/howto/custom-operator.html already show how to do this without a plugin. Closes #9498
636a2f5 to
d2bb3f3
Compare
d2bb3f3 to
b0672c1
Compare
Member
Author
|
No, I just did a stupid :) Hopefully an easy fix. |
b0672c1 to
f8f4319
Compare
|
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*. |
ea0807a to
ba4122f
Compare
This adds two imports -- one at registration time: ``` /home/ash/airflow/plugins/example.py:27: FutureWarning: Registering operator or sensors in plugins is deprecated -- these should be treated like 'plain' python modules, and imported normally in DAGs. Airflow 2.0 has removed the ability to register these types in plugins. See <http://airflow.apache.org/docs/stable/howto/custom-operator.html>. class LinksPlugin(AirflowPlugin): ``` (The source/file shown here is the `class` line of the defining plugin.) And a second at import time: ``` /home/ash/airflow/dags/foo.py:1: FutureWarning: Importing 'MyOperator' from under 'airflow.operators.*' has been deprecated and should be directly imported as 'example.MyOperator' instead. Support for importing from within the airflow namespace for plugins will be dropped entirely in Airflow 2.0. See <http://airflow.apache.org/docs/stable/howto/custom-operator.html>. from airflow.operators.links_plugin import MyOperator ``` (The source here is where the import is used - i.e. in the DAG) Closes apache#9500
ba4122f to
90b1128
Compare
Member
Author
|
Just random failures left. Merging now. |
cfei18
pushed a commit
to cfei18/incubator-airflow
that referenced
this pull request
Mar 5, 2021
This adds two warnings -- one at registration time: ``` /home/ash/airflow/plugins/example.py:27: FutureWarning: Registering operator or sensors in plugins is deprecated -- these should be treated like 'plain' python modules, and imported normally in DAGs. Airflow 2.0 has removed the ability to register these types in plugins. See <http://airflow.apache.org/docs/stable/howto/custom-operator.html>. class LinksPlugin(AirflowPlugin): ``` (The source/file shown here is the `class` line of the defining plugin.) And a second at import time: ``` /home/ash/airflow/dags/foo.py:1: FutureWarning: Importing 'MyOperator' from under 'airflow.operators.*' has been deprecated and should be directly imported as 'example.MyOperator' instead. Support for importing from within the airflow namespace for plugins will be dropped entirely in Airflow 2.0. See <http://airflow.apache.org/docs/stable/howto/custom-operator.html>. from airflow.operators.links_plugin import MyOperator ``` (The source here is where the import is used - i.e. in the DAG) Closes apache#9500
9 tasks
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.
This adds two warnings -- one at registration time:
(The source/file shown here is the
classline of the defining plugin.)And a second at import time:
(The source here is where the import is used - i.e. in the DAG)
Closes #9500
^ 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.