ashb commented on issue #19785:
URL: https://github.com/apache/airflow/issues/19785#issuecomment-1174850050
I'm not sure this is a bug -- or at least not a bug in the UI.
On 2.2.5:
```
IIn [1]: from datetime import datetime
...:
...: from airflow.models.baseoperator import chain
...: from airflow.operators.dummy import DummyOperator
...: from airflow.utils.edgemodifier import Label
...: from airflow.utils.task_group import TaskGroup
...: from airflow import DAG
...:
...:
...: DEFAULT_ARGS = {"depends_on_past": False, "retries": 2}
...:
...: with DAG(
...: dag_id="label_bug_without_chain",
...: start_date=datetime(2022, 5, 20, 0),
...: default_args=DEFAULT_ARGS,
...: ) as dag:
...:
...: with TaskGroup(group_id="group1") as taskgroup1:
...: t1 = DummyOperator(task_id="dummy1")
...: t2 = DummyOperator(task_id="dummy2")
...: t3 = DummyOperator(task_id="dummy3")
...:
...: t4 = DummyOperator(task_id="dummy4")
...:
...: chain([Label("branch three")], taskgroup1, t4)
...:
In [2]: taskgroup1.upstream_list
Out[2]:
[<Task(DummyOperator): group1.dummy1>,
<Task(DummyOperator): group1.dummy3>,
<Task(DummyOperator): group1.dummy2>]
```
The task group is marked as depending on it self. The bug is that we don't
detect the cycle earlier during the DAG parsing process!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]