-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix x-ray dashboards run some queries twice on load #40844
Conversation
|
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.
I think having a spec for this can be handy to avoid reintroducing the issue. Also, since it is a quick fix, can you please create a tech debt issue to remove the unnecessary initial render with an empty object?
I'm afraid an E2E test here would be very flaky and unreliable. The number of redundant requests is different every time, even on a local machine with no network latency
I think ideally we should migrate x-rays to the same dashboard fetching logic as other kinds of dashboard (mainly via |
Agree, that would be ideal |
@metabase-bot backport release-x.48.x |
* Fix parameter values comparison in x-rays * Skip rerun when `parameterValues` are not initialized * Remove not used code
* Fix parameter values comparison in x-rays * Skip rerun when `parameterValues` are not initialized * Remove not used code
* Fix parameter values comparison in x-rays * Skip rerun when `parameterValues` are not initialized * Remove not used code
* Fix parameter values comparison in x-rays * Skip rerun when `parameterValues` are not initialized * Remove not used code
Closes #36775
X-ray code has a check that should rerun queries when parameter values changes. Apparently, the first time it's triggered, it receives two maps: one is just empty (
{}
), and another has all the parameter values set tonull
. Even though they both basically mean "dashboard filters don't have values set", underscore'sisEqual
treats them as different, and that triggers extra query reruns.This PR is rather a band-aid, we should invest some time into unifying this logic with regular and public/embedded dashboards that don't have this issue in the first place
How to verify
/api/dataset
requests in the Network tab