ashb commented on a change in pull request #12512:
URL: https://github.com/apache/airflow/pull/12512#discussion_r528754479



##########
File path: airflow/providers_manager.py
##########
@@ -46,42 +50,136 @@ class ProvidersManager:
     """Manages all provider packages."""
 
     def __init__(self):
-        self._provider_directory = {}
-        try:
-            from airflow import providers
-        except ImportError as e:
-            log.warning("No providers are present or error when importing 
them! :%s", e)
-            return
+        # Keeps list of providers keyed by module name and value is Tuple: 
version, provider_info
+        self._provider_directory: Dict[str, Tuple[str, Dict]] = OrderedDict()
+        self._provider_list: [Tuple[str, str, Dict]] = []
+        self._provider_set: Set[str] = set()
         self._validator = _create_validator()
-        self.__find_all_providers(providers.__path__)
+        # Local source folders are loaded first. They should take precedence 
over the package ones for
+        # Development purpose. In production provider.yaml files are not 
present in the 'airflow" directory
+        # So there is no risk we are going to override package provider 
accidentally. This can only happen
+        # in case of local development
+        self.__find_all_airflow_builtin_providers_from_local_sources()

Review comment:
       See https://github.com/apache/airflow/pull/12472#discussion_r528743279 
(maybe rename `find` to `discover`




----------------------------------------------------------------
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]


Reply via email to