-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying labels to task groups shows a cycle in the graph view for the dag #19785
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
cc @bbovenzi |
Related: #19899 I think we will remove the blue dots entirely as they seem to cause confusion and weird issues. |
@bbovenzi I tried to reproduce this issue and It seems like now this DAG is breaking the Grid view: Removing the line: Code:
|
Is there a stack trace in the webserver logs? (It looks like the API call failed with a 500) |
For the above dag, writing the chain as below works: chain([Label("branch three")], [taskgroup1], t4) or chain(Label("branch three"), taskgroup1, t4) |
Yes. Here's the stacktrace:
|
I'm not sure this is a bug -- or at least not a bug in the UI. On 2.2.5:
The task group is marked as depending on itself! The bug is that we don't detect the cycle earlier during the DAG parsing process! |
Not to mention this DAG is invalid -- a label must be between two nodes, it can't be at the start of one. |
But the end result of Grid view crash is not desired. |
The example code given in the OP doesn't quite match the picture they showed (missing the start task) |
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:
start = DummyOperator(task_id="sleep_3_seconds")
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="echo_done")
chain(start, [Label("branch three")], taskgroup1, t4) The issue is still shows up with this dag though. |
Apache Airflow version
2.2.2
Operating System
Docker (debian:buster)
Versions of Apache Airflow Providers
N/A
Deployment
Astronomer
Deployment details
run airflow with this dag
What happened
expanded task views look like they have cycles
What you expected to happen
The task group shouldn't display as if it has loops in it.
How to reproduce
View the dag shown in the deployment details.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: