-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Dashboard] [Controls] Skip First Reload #142868
[Dashboard] [Controls] Skip First Reload #142868
Conversation
…om control group initialization are applied
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-presentation (Team:Presentation) |
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.
Code review + tested locally by putting the console.log
in the place described and doing the following:
- Loaded a dashboard with controls with no selections -
lastReloadRequestTime
was not updated by the control group - Made a selection for one of the controls -
lastReloadRequestTime
was* updated - Saved the dashboard after making selection and refreshed the dashboard -
lastReloadRequestTime
was not updated and the filters from the previous selections were applied as expected - Made another selection, leaving the dashboard in an unsaved state, and refreshed the dashboard -
lastReloadRequestTime
was not updated and the filters from the unsaved selections were applied as expected
* Skip first reload of dashboard controls to ensure only the filters from control group initialization are applied (cherry picked from commit 5a17c64)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
* Skip first reload of dashboard controls to ensure only the filters from control group initialization are applied
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
* [Dashboard] [Controls] Skip First Reload (#142868) * Skip first reload of dashboard controls to ensure only the filters from control group initialization are applied (cherry picked from commit 5a17c64) * temporarily skip problematic test suite Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
* Skip first reload of dashboard controls to ensure only the filters from control group initialization are applied
Summary
Fixes an issue where Discover Saved Searches sometimes were
aborted
on the first load of a dashboard.This was caused by the control group forcing a
lastReloadRequestTime
updated on dashboards on their first load, even though the control group selections which were saved into the dashboard had already been applied.This PR fixes this by postponing the dashboard control group sync code until after the control group is finished loading and outputting its initial filters, and by skipping the first, blank filter update that the control group outputs.
How to test
Because the discover issue is difficult to reproduce with the demo data, and locally, the best way to test this would be to place a console log in
src/plugins/dashboard/public/application/lib/dashboard_control_group.ts
line 146. and ensure that the dashboard container'slastReloadRequestTime
is only updated when expected.Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers