* [AIRFLOW-3605] Add entrypoint plugin docs
This documentation came from https://github.com/apache/incubator-airflow/pull/730 which had already started work on a PR for this functionality.
* [AIRFLOW-3605] Extend plugin loading functionality
Added business logic to import AirflowPlugin classes through entry_points.
This means we don’t have to interact with the file system directly to install plugins, and can manage them via `pip`.
This adds ASF license headers to all the .rst and .md files with the
exception of the Pull Request template (as that is included verbatim
when opening a Pull Request on Github which would be messy)
Airflow Users that wish to create plugins for the new www_rbac UI
can not add plugin views or links. This PR fixes that by letting
a user specify their plugins for www_rbac and maintains backwards
compatibility with the existing plugins system.
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
* Distinguish between module and non-module plugin
components
* Fix handling of non-module plugin components
* admin views, flask blueprints, and menu links
need to not be
wrapped in modules
* Fix improper use of zope.deprecation.deprecated
* zope.deprecation.deprecated does NOT support
classes as
first parameter
* deprecating classes must be handled by calling
the deprecate
function on the class name
* Added tests for plugin loading
* Updated plugin documentation to match test
plugin
* Updated executors to always load plugins
* More logging
Closes#1738 from gwax/plugin_module_fixes
The plugins tutorial was lacking in the following ways:
1. I wasn't sure where my template should live
2. I wasn't aware that both the TestView and Blueprint were necessary
In lieu of a code refactor, here's my suggestion on how to make the documentation more helpful from the perspective of someone who doesn't have experience with Flask Blueprints and Flask Admin, which can prevent the deep-dive into the code and supporting libs that I just did!