airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] kaxil commented on a change in pull request #6715: [AIRFLOW-5945] Make inbuilt OperatorLinks work when using Serialization
Date Tue, 03 Dec 2019 11:01:53 GMT
kaxil commented on a change in pull request #6715: [AIRFLOW-5945] Make inbuilt OperatorLinks
work when using Serialization
URL: https://github.com/apache/airflow/pull/6715#discussion_r353113287
 
 

 ##########
 File path: airflow/serialization/serialized_baseoperator.py
 ##########
 @@ -89,7 +96,10 @@ def deserialize_operator(cls, encoded_op: dict) -> BaseOperator:
                         operator.__module__ == encoded_op["_task_module"]:
                     op_extra_links_from_plugin.update({ope.name: ope})
 
-        setattr(op, "operator_extra_links", list(op_extra_links_from_plugin.values()))
+        # If OperatorLinks is defined in Plugins but not in the Operator
+        # set the Operator links attribute
+        if op_extra_links_from_plugin and "_operator_links_sources" not in encoded_op:
+            setattr(op, "operator_extra_links", list(op_extra_links_from_plugin.values()))
 
 Review comment:
   If we define in a plugin and in operator, then the following code get's executed:
   https://github.com/apache/airflow/pull/6715/files#diff-f58748b66b2d3d00c8132103faea223fR114-R121
   
   I can add more detailed comments if it is not clear.
   
   

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


With regards,
Apache Git Services

Mime
View raw message