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/11/30 00:11:26 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #12472: Allow registering extra links for providers

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



##########
File path: airflow/providers_manager.py
##########
@@ -178,7 +181,49 @@ def _add_provider_info_from_local_source_file(self, path, package_name) -> None:
         except Exception as e:  # noqa pylint: disable=broad-except
             log.warning("Error when loading '%s': %s", path, e)
 
+    def _discover_extra_links(self) -> None:
+        """Retrieves all extra links defined in the providers"""
+        for provider_package, (_, provider) in self._provider_dict.items():
+            if provider.get("extra-links"):
+                for extra_link in provider["extra-links"]:
+                    self.__add_extra_link(extra_link, provider_package)
+
+    def __add_extra_link(self, extra_link_class_name, provider_package) -> None:

Review comment:
       Yep. And on Ash's request I am changing it to protected.




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