-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Feature(UI) : Add upstream/downstream task filtering in Graph & Grid views (#53458) #54722
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
Feature(UI) : Add upstream/downstream task filtering in Graph & Grid views (#53458) #54722
Conversation
392fc8d to
d211557
Compare
|
Thanks for adding this! I think we need to make it more obvious when the grid+graph are filtered. Especially if I filter on one task but then click on a different task. Perhaps the filter button should be moved next to the "Options" dropdown? Also, we should probably filter the Tasks list while we're at it: #54163 |
...-core/src/airflow/ui/src/components/TaskFilter/TaskInstance/TaskFilterTaskInstanceButton.tsx
Outdated
Show resolved
Hide resolved
...-core/src/airflow/ui/src/components/TaskFilter/TaskInstance/TaskFilterTaskInstanceButton.tsx
Outdated
Show resolved
Hide resolved
...-core/src/airflow/ui/src/components/TaskFilter/TaskInstance/TaskFilterTaskInstanceButton.tsx
Outdated
Show resolved
Hide resolved
...-core/src/airflow/ui/src/components/TaskFilter/TaskInstance/TaskFilterTaskInstanceButton.tsx
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/src/components/TaskFilter/index.tsx
Outdated
Show resolved
Hide resolved
...-core/src/airflow/ui/src/components/TaskFilter/TaskInstance/TaskFilterTaskInstanceButton.tsx
Outdated
Show resolved
Hide resolved
|
I'm very excited to see this, thank you for adding it. I'm not a front end person so I'll leave the review to Brent |
|
Just FYI 3.1 is in the process of being prepared. If this PR isn't merged/completed by the end of the week it will miss 3.1 and we will have to wait for the next release. |
cbd1654 to
7a6e1f7
Compare
| /> | ||
| {isActiveForThisTask ? ( | ||
| <Box | ||
| bg="blue.500" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a semantic token here instead of hard coding blue.500
| "taskFilter": { | ||
| "action_prefix": "Filter", | ||
| "all": "All", | ||
| "both": "Both upstream & downstream", | ||
| "button_all": "Filter DAG by task", | ||
| "downstream": "Only downstream", | ||
| "upstream": "Only upstream" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is after translation freeze. You should post this PR in the i18n channel of the Airflow Slack.
| taskInstance={taskInstance} | ||
| withText={containerWidth > 700} | ||
| /> | ||
| <FilterTaskButton withText={containerWidth > 700} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this hardcode value now that there are so many buttons. Do you mind making it const HEADER_BREAKPOINT = 1000;?
| "action_prefix": "Filter", | ||
| "all": "All", | ||
| "both": "Both upstream & downstream", | ||
| "button_all": "Filter DAG by task", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "button_all": "Filter DAG by task", | |
| "button_all": "Filter Dag by task", |
|
@Prasanth345 Can you rebase this so we can get this PR for 3.2? |
|
@Prasanth345 are you still working on this? |
|
Closing now that #57237 was merged |
Summary
This PR addresses #53458 by introducing task filtering options in both Graph and Grid views to improve task visualization and debugging.
Users can now filter the DAG to display:
Implementation Details
upstreamMapanddownstreamMap) from DAG structure data.visibleIdslogic to selectively show tasks based on filter selection.Filterdropdown with options:ActionButtonso display text (buttonLabel) can differ from dropdown item label.Testing
Why
This improves DAG observability by letting users focus on relevant upstream/downstream chains. It is especially useful for large DAGs where visual noise makes debugging difficult.
Related Issue
Closes #53458
Below find the screenshots
Before filter added
After filter added