Skip to content

Dashboard filters allow creating bi-directional dependencies in an unexpected way with value filters #33908

@msyavuz

Description

@msyavuz

Bug description

When configuring dashboard filters with the "Values are dependent on other filters" option, the system prevents creating bi-directional dependencies upfront by showing a "Cyclic dependency detected" message. However, it allows creating the same dependency indirectly after saving the initial filter configuration.

  1. If Filter A is set to depend on Filter B, the system blocks setting Filter B to depend on Filter A immediately, showing a "Cyclic dependency detected" message.
  2. However, if Filter A is saved with the dependency on Filter B, the system later allows editing Filter B to create the reverse dependency, effectively forming a bi-directional (cyclic) dependency.

This behavior is inconsistent and might lead to unexpected filter behavior. It appears to contradict the intended prevention of cyclic dependencies.
How to reproduce the bug

  1. Create a dashboard filter (e.g., Filter A) with a dependency on another filter (e.g., Filter B) by enabling the Values are dependent on other filters option.
  2. Save the filter configuration.
  3. Open the dashboard filter configuration again, select Filter B, and set it to depend on Filter A.
  4. Save the changes.

Expected results

The system should prevent bi-directional (cyclic) dependencies for all filter types, not just date filters. Users should not be able to create a cyclic dependency by editing the filters after saving the initial configuration.

Actual results

The platform allows creating cyclic dependencies indirectly after the initial configuration, even though it prevents it upfront. This behavior is inconsistent and may lead to unexpected filter behavior.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

Labels

dashboard:cross-filtersRelated to the Dashboard cross filtersgood first issueGood first issues for new contributorspreset:bountyIssues that have been selected by Preset and have a bounty attached.preset:bounty:bugBugs that have been selected by Preset and have a bounty attached.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions