drewsonne commented on a change in pull request #4412: [AIRFLOW-3605] Load plugins from entry_points URL: https://github.com/apache/airflow/pull/4412#discussion_r246059915
########## File path: airflow/plugins_manager.py ########## @@ -90,19 +142,17 @@ def validate(cls): m = imp.load_source(namespace, filepath) for obj in list(m.__dict__.values()): - if ( - inspect.isclass(obj) and - issubclass(obj, AirflowPlugin) and - obj is not AirflowPlugin): - obj.validate() - if obj not in plugins: - plugins.append(obj) + if is_valid_plugin(obj, plugins): + plugins.append(obj) except Exception as e: log.exception(e) log.error('Failed to import plugin %s', filepath) import_errors[filepath] = str(e) +plugins += load_entrypoint_plugins( + pkg_resources.iter_entry_points('airflow.plugins')) Review comment: You are correct, we're not checking for double loading of plugins from both sources. Will change. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services