Skip to content

Commit

Permalink
Fix ExternalTaskSensor not working with dynamic task (#25215)
Browse files Browse the repository at this point in the history
* Make operator_extra_links a class variable

* Make operator_extra_links a class variable of ExternalTaskMarker
  • Loading branch information
yenchenLiu authored Jul 25, 2022
1 parent 4b28635 commit d7f4ee1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions airflow/sensors/external_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ class ExternalTaskSensor(BaseSensorOperator):

template_fields = ['external_dag_id', 'external_task_id', 'external_task_ids']
ui_color = '#19647e'

@property
def operator_extra_links(self):
"""Return operator extra links"""
return [ExternalDagLink()]
operator_extra_links = [ExternalDagLink()]

def __init__(
self,
Expand Down Expand Up @@ -316,15 +312,11 @@ class ExternalTaskMarker(EmptyOperator):

template_fields = ['external_dag_id', 'external_task_id', 'execution_date']
ui_color = '#19647e'
operator_extra_links = [ExternalDagLink()]

# The _serialized_fields are lazily loaded when get_serialized_fields() method is called
__serialized_fields: Optional[FrozenSet[str]] = None

@property
def operator_extra_links(self):
"""Return operator extra links"""
return [ExternalDagLink()]

def __init__(
self,
*,
Expand Down

0 comments on commit d7f4ee1

Please sign in to comment.