ashb commented on a change in pull request #8732:
URL: https://github.com/apache/airflow/pull/8732#discussion_r420782432
##########
File path: airflow/plugins_manager.py
##########
@@ -141,13 +141,16 @@ def load_entrypoint_plugins():
log.debug("Loading plugins from entrypoints")
- for entry_point in entry_points:
+ for entry_point in entry_points: # pylint: disable=too-many-nested-blocks
log.debug('Importing entry_point plugin %s', entry_point.name)
- plugin_obj = entry_point.load()
- if is_valid_plugin(plugin_obj):
- if callable(getattr(plugin_obj, 'on_load', None)):
- plugin_obj.on_load()
- plugins.append(plugin_obj)
+ try:
+ plugin_obj = entry_point.load()
+ if is_valid_plugin(plugin_obj):
+ if callable(getattr(plugin_obj, 'on_load', None)):
+ plugin_obj.on_load()
+ plugins.append(plugin_obj)
+ except Exception as e: # pylint: disable=broad-except
+ log.exception(e)
Review comment:
We should log _which_ plugin it was that failed/caused the error too.
Additionally you don't need to include `e`, log.exception will already log
that
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]