-
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
[Controls] Fix Initialization Race Condition #143220
[Controls] Fix Initialization Race Condition #143220
Conversation
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
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:
- Throttled the network connection and ensured that the control group fully loaded before the dashboard container did
- Console logged once the control group children were all marked as ready, the control group was initialized, and the dashboard container was done loading - ensured that these logs followed the expected order under various conditions.
- Followed a dashboard-to-dashboard drilldown with control selections and everything worked as expected.
Everything worked great 👍 What a nasty bug!
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
* Fix Initialization Race Condition (cherry picked from commit 702827b) # Conflicts: # src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx # x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts
* Fix Initialization Race Condition (cherry picked from commit 702827b) # Conflicts: # src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx # x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts
Summary
Fixes a race condition introduced in #142868 by forcing the dashboard container to initialize after the control group is finished loading.
Previously, the dashboard viewport and the container would wait until all of the Control children had finished loading before rendering, but they would not wait for the control group to finish loading before starting to initialize embeddable children.
This could cause a race condition in cases when the Dashboard's panels loaded too quickly to get the initial filters from the control group.
Fixes #142912
Fixes #142913
Flaky test runner