Skip to content
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

Hierarchical filters hang when filters are made parents of one another #15483

Closed
3 tasks done
rbruehlman opened this issue Jun 30, 2021 · 1 comment · Fixed by #16921
Closed
3 tasks done

Hierarchical filters hang when filters are made parents of one another #15483

rbruehlman opened this issue Jun 30, 2021 · 1 comment · Fixed by #16921
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P3 Priority item - Normal

Comments

@rbruehlman
Copy link

rbruehlman commented Jun 30, 2021

Suppose you have Filter A and Filter B. You set Filter A to be a hierarchical filter and its parent to be Filter B. Then you set Filter B to be a hierarchical filter and its parent to be Filter A. The app hangs. If you open up the dev console, you will see errors printed out complaining about maximum recursion depth exceeded.

Expected results

Filters with already assigned relationships should be excluded from the drop down.

Actual results

All available filters are shown and the app goes into a recursive loop if you fatfinger and select a preexisting child.

How to reproduce the bug

  1. Create two filters (filter A and B)
  2. Set filter A to be hierarchical and parent as Filter B
  3. Set Filter B to be hierarchical and parent to be Filter A
  4. Watch app hang forever :(

Environment

  • superset version: 1.3 branch
  • python version: Python 3.7.9
  • node.js version: 14

Checklist

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@rbruehlman rbruehlman added the #bug Bug report label Jun 30, 2021
@junlincc
Copy link
Member

junlincc commented Jul 1, 2021

@vermilioncity thanks for reporting. I was able to reproduce.
This case is tricky! We can't really check both filters as hierarchical and parent.
However, ideally there should be two hierarchical filter sets showing on the filter bar with A as parent, B as child & B as parent A as child. And user can switch between 2 groups. But right now, when I create two groups separately, all the filters become children of A... see video

Have you tried using filter sets (behind another feature flag) as an alternative?

Screen.Recording.2021-06-30.at.5.04.05.PM.mov

this seems quite hard to fix and it's really an edge case. @villebro wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P3 Priority item - Normal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants