[dashboard] fixs controls cause double fetch#237169
Conversation
|
/ci |
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
ThomThomson
left a comment
There was a problem hiding this comment.
Changes LGTM! Great to fix that very severe bug, and this is definitely simple enough to be widely backported. Tested locally to ensure no more duplicate requests and looked through the code.
| }); | ||
|
|
||
| // simulate controls ready | ||
| controlsReadyMock$.next(true); |
|
Starting backport for target branches: 8.18, 8.19, 9.1, 9.2 https://github.com/elastic/kibana/actions/runs/18199570117 |
Fixes elastic#237147 PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available. This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready. ### Testing * install sample web logs * create new dashboard * add options list control on field `machine.os.keyword` * Select `ios` in control * add metric vis with count * save dashboard * open dashboard filter network requests to `ese`. Ensure metric chart only makes a single request <img width="2048" height="698" alt="Screenshot 2025-10-01 at 12 39 45 PM" src="https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7" /> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 7f7bd4f)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Fixes elastic#237147 PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available. This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready. ### Testing * install sample web logs * create new dashboard * add options list control on field `machine.os.keyword` * Select `ios` in control * add metric vis with count * save dashboard * open dashboard filter network requests to `ese`. Ensure metric chart only makes a single request <img width="2048" height="698" alt="Screenshot 2025-10-01 at 12 39 45 PM" src="https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7" /> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 7f7bd4f) # Conflicts: # src/platform/plugins/shared/dashboard/public/dashboard_api/control_group_manager.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/get_dashboard_api.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/types.ts # src/platform/plugins/shared/dashboard/public/dashboard_renderer/viewport/dashboard_viewport.tsx
Fixes elastic#237147 PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available. This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready. ### Testing * install sample web logs * create new dashboard * add options list control on field `machine.os.keyword` * Select `ios` in control * add metric vis with count * save dashboard * open dashboard filter network requests to `ese`. Ensure metric chart only makes a single request <img width="2048" height="698" alt="Screenshot 2025-10-01 at 12 39 45 PM" src="https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7" /> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 7f7bd4f) # Conflicts: # src/platform/plugins/shared/dashboard/public/dashboard_api/control_group_manager.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/get_dashboard_api.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/types.ts # src/platform/plugins/shared/dashboard/public/dashboard_renderer/viewport/dashboard_viewport.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Fixes elastic#237147 PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available. This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready. ### Testing * install sample web logs * create new dashboard * add options list control on field `machine.os.keyword` * Select `ios` in control * add metric vis with count * save dashboard * open dashboard filter network requests to `ese`. Ensure metric chart only makes a single request <img width="2048" height="698" alt="Screenshot 2025-10-01 at 12 39 45 PM" src="https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7" /> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 7f7bd4f) # Conflicts: # src/platform/plugins/shared/dashboard/public/dashboard_api/control_group_manager.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/get_dashboard_api.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/types.ts # src/platform/plugins/shared/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx # src/platform/plugins/shared/dashboard/public/dashboard_renderer/viewport/dashboard_viewport.test.tsx
# Backport This will backport the following commits from `main` to `9.1`: - [[dashboard] fixs controls cause double fetch (#237169)](#237169) <!--- Backport version: 10.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T16:42:05Z","message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.3.0","v8.19.9","v9.1.6","v8.18.9"],"title":"[dashboard] fixs controls cause double fetch","number":237169,"url":"https://github.com/elastic/kibana/pull/237169","mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","8.18"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/237356","number":237356,"state":"OPEN"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237169","number":237169,"mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
# Backport This will backport the following commits from `main` to `8.19`: - [[dashboard] fixs controls cause double fetch (#237169)](#237169) <!--- Backport version: 10.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T16:42:05Z","message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.3.0","v8.19.9","v9.1.6","v8.18.9"],"title":"[dashboard] fixs controls cause double fetch","number":237169,"url":"https://github.com/elastic/kibana/pull/237169","mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","8.18"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/237356","number":237356,"state":"OPEN"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237169","number":237169,"mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
# Backport This will backport the following commits from `main` to `8.18`: - [[dashboard] fixs controls cause double fetch (#237169)](#237169) <!--- Backport version: 10.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T16:42:05Z","message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.3.0","v8.19.9","v9.1.6","v8.18.9"],"title":"[dashboard] fixs controls cause double fetch","number":237169,"url":"https://github.com/elastic/kibana/pull/237169","mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.1","8.18"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/237356","number":237356,"state":"OPEN"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237169","number":237169,"mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
# Backport This will backport the following commits from `main` to `9.2`: - [[dashboard] fixs controls cause double fetch (#237169)](#237169) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T16:42:05Z","message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.3.0","v8.19.9","v9.1.6","v8.18.9"],"title":"[dashboard] fixs controls cause double fetch","number":237169,"url":"https://github.com/elastic/kibana/pull/237169","mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","8.19","9.1","8.18"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237169","number":237169,"mergeCommit":{"message":"[dashboard] fixs controls cause double fetch (#237169)\n\nFixes https://github.com/elastic/kibana/issues/237147\n\nPR updates dashboard to wait until controls are ready before rendering\npanels. This prevents a double fetch when panels would fetch data while\ncontrols where building filters and then fetch data again once controls\nfilters are available.\n\nThis PR introduces a small performance degradation to dashboards with\ncontrols. Panels will not start rendering until controls have finished\ninitializing. This is a better performance trade-off then the current\nbehavior of issuing a new round of requests once controls are ready.\n\n### Testing\n* install sample web logs\n* create new dashboard \n* add options list control on field `machine.os.keyword`\n* Select `ios` in control\n* add metric vis with count\n* save dashboard\n* open dashboard filter network requests to `ese`. Ensure metric chart\nonly makes a single request\n<img width=\"2048\" height=\"698\" alt=\"Screenshot 2025-10-01 at 12 39\n45 PM\"\nsrc=\"https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"7f7bd4fd3b5d731ba9f2e073f4a2a82efad0cd4c"}},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan Reese <reese.nathan@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Fixes elastic#237147 PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available. This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready. ### Testing * install sample web logs * create new dashboard * add options list control on field `machine.os.keyword` * Select `ios` in control * add metric vis with count * save dashboard * open dashboard filter network requests to `ese`. Ensure metric chart only makes a single request <img width="2048" height="698" alt="Screenshot 2025-10-01 at 12 39 45 PM" src="https://github.com/user-attachments/assets/b24e039c-2585-4eec-af9b-e459fccf90d7" /> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes #237147
PR updates dashboard to wait until controls are ready before rendering panels. This prevents a double fetch when panels would fetch data while controls where building filters and then fetch data again once controls filters are available.
This PR introduces a small performance degradation to dashboards with controls. Panels will not start rendering until controls have finished initializing. This is a better performance trade-off then the current behavior of issuing a new round of requests once controls are ready.
Testing
machine.os.keywordiosin controlese. Ensure metric chart only makes a single request