Empty Task Groups Appear in Graph View #26741
Replies: 6 comments
-
Why? User did code it. |
Beta Was this translation helpful? Give feedback.
-
@eladkal ok, that's fair. If you think that somebody wants this behavior I'll happily close the ticket. I had assumed that it was the way it was but just because we didn't give it much thought. I dislike it because when people look at my DAG and see a box floating out of context, they assume that it's of elevated importance and not diminished importance. They ask:
To which I answer:
I can work around it by adding an EmptyOperator to my task groups so there's something anchor them to the rest of the dag even when they're generated by a loop or condition that happens to be empty this time. |
Beta Was this translation helpful? Give feedback.
-
True but on the other hand in complex dags where you have dozens of tasks and task group you dont want the UI to hide stuff it will be harder to identify and remove redundant code. Could we maybe mark in the UI that its empty? Maybe diffrent edges or something like that? |
Beta Was this translation helpful? Give feedback.
-
Making it look different would at least prevent it from looking like something that I should click to expand. It's such an unlikely case though, seems weird to dedicate a style to it. Another approach would be to have it say
Honestly though, I hadn't thought this deeply when I wrote the issue. My gut reaction was:
So I wrote an issue. If my gut was miscalibrated in this case, well we probably have bigger fish to fry and I'm happy to just close it. |
Beta Was this translation helpful? Give feedback.
-
I also think we should still show it 🤷♂️. In general I'm not a fan of just hiding things. |
Beta Was this translation helpful? Give feedback.
-
OK so I'm converting this one to discussion as an idea :) |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.4.0
What happened
This is not a regression, it's just that I comes up so rarely that I hadn't bothered with the bug until now. Here's two dags:
And the corresponding graph views:
Note that there are no tasks in the
fan_out
task group in thetwo
dag, yet a disconnected task group shows up.What you think should happen instead
If a TaskGroup has no tasks, it should not be shown.
How to reproduce
View the graph view for the above dags file
Operating System
docker/debian
Versions of Apache Airflow Providers
n/a
Deployment
Astronomer
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions