This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 155ef09721 `ExternalTaskSensor`: add `external_task_group_id` to
`template_fields` (#30401)
155ef09721 is described below
commit 155ef09721e5af9a8be8841eb0e690edbfe36188
Author: Liam Ormiston <[email protected]>
AuthorDate: Sat Apr 22 12:20:38 2023 -0500
`ExternalTaskSensor`: add `external_task_group_id` to `template_fields`
(#30401)
* Add missing info in external_task.py
Add missing external_task_group_id parameter to the ExternalTaskSensor
docstring and template_fields.
As suggested, to match other operator classes add `(templated)` to
templated fields.
---
airflow/sensors/external_task.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/airflow/sensors/external_task.py b/airflow/sensors/external_task.py
index a79302ddce..03a313a680 100644
--- a/airflow/sensors/external_task.py
+++ b/airflow/sensors/external_task.py
@@ -97,13 +97,15 @@ class ExternalTaskSensor(BaseSensorOperator):
cause the sensor to skip if the target fails, but also if it times out.
:param external_dag_id: The dag_id that contains the task you want to
- wait for
+ wait for. (templated)
:param external_task_id: The task_id that contains the task you want to
- wait for.
- :param external_task_ids: The list of task_ids that you want to wait for.
+ wait for. (templated)
+ :param external_task_ids: The list of task_ids that you want to wait for.
(templated)
If ``None`` (default value) the sensor waits for the DAG. Either
external_task_id or external_task_ids can be passed to
ExternalTaskSensor, but not both.
+ :param external_task_group_id: The task_group_id that contains the task
you want to
+ wait for. (templated)
:param allowed_states: Iterable of allowed states, default is
``['success']``
:param skipped_states: Iterable of states to make this task mark as
skipped, default is ``None``
:param failed_states: Iterable of failed or dis-allowed states, default is
``None``
@@ -123,7 +125,7 @@ class ExternalTaskSensor(BaseSensorOperator):
or DAG does not exist (default value: False).
"""
- template_fields = ["external_dag_id", "external_task_id",
"external_task_ids"]
+ template_fields = ["external_dag_id", "external_task_id",
"external_task_ids", "external_task_group_id"]
ui_color = "#19647e"
operator_extra_links = [ExternalDagLink()]