airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] feluelle commented on a change in pull request #6596: [AIRFLOW-6004] Untangle Executors class to avoid cyclic imports
Date Wed, 27 Nov 2019 12:44:50 GMT
feluelle commented on a change in pull request #6596: [AIRFLOW-6004] Untangle Executors class
to avoid cyclic imports
URL: https://github.com/apache/airflow/pull/6596#discussion_r351239001
 
 

 ##########
 File path: airflow/plugins_manager.py
 ##########
 @@ -187,26 +197,29 @@ def make_module(name, objects):
 macros_modules = []
 
 # Plugin components to integrate directly
-admin_views = []  # type: List[Any]
-flask_blueprints = []  # type: List[Any]
-menu_links = []  # type: List[Any]
-flask_appbuilder_views = []  # type: List[Any]
-flask_appbuilder_menu_links = []  # type: List[Any]
-stat_name_handler = None  # type: Any
-global_operator_extra_links = []  # type: List[BaseOperatorLink]
-operator_extra_links = []  # type: List[BaseOperatorLink]
+admin_views: List[Any] = []
+flask_blueprints: List[Any] = []
+menu_links: List[Any] = []
+flask_appbuilder_views: List[Any] = []
+flask_appbuilder_menu_links: List[Any] = []
+stat_name_handler: Any = None
+global_operator_extra_links: List[Any] = []
+operator_extra_links: List[Any] = []
 
 stat_name_handlers = []
 for p in plugins:
+    if not p.name:
+        raise AirflowPluginException("Plugin name is missing.")
+    plugin_name: str = p.name
 
 Review comment:
   Why did you add a `plugin_name` but not `plugin_operators`, etc. for example?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message