-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
on_load method is not working for plugins located in folder #10868
Comments
If this is really a bug, can I contribute? |
@maiorBoltach Yes. We are open to contributions from everyone. I assigned you to this ticket. Contributor guide: https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst |
It' a real bug. See: airflow.plugins_manager.load_plugins_from_plugin_directory This does not call the on_load method. |
@mik-laj should I also make PR for 1-10 version or we leave it only in 2.0? |
Only for master. we are not making non-critical changes to 1.10 |
Apache Airflow version: 1.10.12
Environment:
uname -a
): 3.10.0-1062.18.1.el7.x86_64 Improving the search functionality in the graph view #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxWhat happened:
Class method on_load of AirflowPlugin class doesn't run after plugins located in plugin folder, only for plugins installed through pip.
What you expected to happen:
Method 'on_load' should run on plugins initialization, that are located in plugin folder
How to reproduce it:
Result: Webserver logs are empty, new menu appeared in UI.
Expected result: Webserver logs should contain information with raised exception, new menu shouldn't appear in UI.
Reason: on_load method is called only for airflow.plugins.* entry_points
airflow/airflow/plugins_manager.py
Line 152 in ce66bc9
Additional information: It is not clear what is the reason for skipping this method call for plugins contained in the folder. At the same time, plugin validation successfully run for plugins from a folder and installed via a package. Validation uses validate method in same AirflowPlugin class and can be extended by user.
airflow/airflow/plugins_manager.py
Line 96 in b9dc3c5
The text was updated successfully, but these errors were encountered: