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/28 19:47:19 UTC

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

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



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -53,14 +55,23 @@
 log = logging.getLogger(__name__)
 FAILED = 'serialization_failed'
 
-BUILTIN_OPERATOR_EXTRA_LINKS: List[str] = [
-    "airflow.providers.google.cloud.operators.bigquery.BigQueryConsoleLink",
-    "airflow.providers.google.cloud.operators.bigquery.BigQueryConsoleIndexableLink",
-    "airflow.providers.google.cloud.operators.mlengine.AIPlatformConsoleLink",
-    "airflow.providers.qubole.operators.qubole.QDSLink",
+_OPERATOR_EXTRA_LINKS: Set[str] = {
     "airflow.operators.dagrun_operator.TriggerDagRunLink",
     "airflow.sensors.external_task_sensor.ExternalTaskSensorLink",
-]
+}
+
+cache = lru_cache(maxsize=None)
+
+
+@cache

Review comment:
       This was because in newer versions of func_tools there is a `cache` function that does this, so it's mirroring that. Could probably do with a comment, or at the top:
   
   ```python
   try:
       from functools import cache
   except ImportError:
       from functools import lru_cache
       cache = lru_cache(maxsize=None)
   ```




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