You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/08 16:10:11 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #12902: Check that needed (backport) providers are installed

potiuk commented on a change in pull request #12902:
URL: https://github.com/apache/airflow/pull/12902#discussion_r538546241



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -49,9 +52,20 @@ def old_class(self):
     def new_class(self):
         return self.new_path.split(".")[-1]
 
+    @classmethod
+    def provider_stub_from_module(cls, module):
+        if "providers" not in module:
+            return None
+
+        # [2:] strips off the airflow.providers. part
+        parts = module.split(".")[2:]
+        if parts[0] in ('apache', 'cncf'):

Review comment:
       microsoft as well. The easiest way is to check for presence of `provider.yaml` now I think. We also have a list of providers in setup.py (with "." names) and it is verified during pre-commit. 




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