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_r354379416
##########
File path: airflow/models/baseoperator.py
##########
@@ -1081,21 +1082,22 @@ def get_extra_links(self, dttm, link_name):
@classmethod
def get_serialized_fields(cls):
"""Stringified DAGs and operators contain exactly these fields."""
- if not cls._serialized_fields:
- cls._serialized_fields = frozenset(
+ if not cls.__serialized_fields:
+ cls.__serialized_fields = frozenset(
vars(BaseOperator(task_id='test')).keys() - {
'inlets', 'outlets', '_upstream_task_ids', 'default_args',
'dag', '_dag'
- } | {'_task_type', 'subdag', 'ui_color', 'ui_fgcolor',
'template_fields'}
- )
- return cls._serialized_fields
+ } | {'_task_type', 'subdag', 'ui_color', 'ui_fgcolor',
'template_fields'})
+
+ return cls.__serialized_fields
[email protected](auto_attribs=True)
class BaseOperatorLink(metaclass=ABCMeta):
"""
Abstract base class that defines how we get an operator link.
"""
- operators: List[Type[BaseOperator]] = []
+ operators = [] # type: List[Type[BaseOperator]]
Review comment:
Fixed
----------------------------------------------------------------
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]
With regards,
Apache Git Services