You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/03/02 08:31:00 UTC
[jira] [Commented] (AIRFLOW-2147) Add 'sensors' attribute for
plugins
[ https://issues.apache.org/jira/browse/AIRFLOW-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383346#comment-16383346 ]
ASF subversion and git services commented on AIRFLOW-2147:
----------------------------------------------------------
Commit fedc5a092c4ceb74c7d02ff932ad7de796705d43 in incubator-airflow's branch refs/heads/master from [~arcward]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=fedc5a0 ]
[AIRFLOW-2147] Plugin manager: added 'sensors' attribute
AirflowPlugin required both BaseOperator and BaseSensorOperator
to be included in its `operators` attribute. Add a `sensors`
attribute and updated import logic so that anything added to
the new attribute can be imported from `airflow.sensors.{plugin_name}`
The integration/`make_module` calls in `airflow.plugins_manager`
for operators is also updated to maintain the ability to import
sensors from `operators` to avoid breaking existing plugins
- Update unit tests and documentation to reflect this
- Added exclusion for flake8 module level import not at top of file
Closes #3075 from arcward/AIRFLOW-2147
> Add 'sensors' attribute for plugins
> -----------------------------------
>
> Key: AIRFLOW-2147
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2147
> Project: Apache Airflow
> Issue Type: Improvement
> Components: plugins
> Affects Versions: Airflow 1.8
> Reporter: Edward Wells
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.0.0
>
>
> I created a pull request: https://github.com/apache/incubator-airflow/pull/3075
> {{airflow.plugins_manager.AirflowPlugin}} has attributes for operators, hooks, executors, macros, admin_views, flask_blueprints and menu_links, but not for sensors.
> Right now, operators/sensors can be imported like:
> {{ from airflow.operators.test_plugin import PluginOperator}}
> It would be intuitive to have sensors importable similarly like:
> {{ from airflow.sensors.test_plugin import PluginSensorOperator}}
> The first time I wrote a plugin I instinctively did it this way until I realized I had to bundle both operators and sensors into operators
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)