Skip to content

[dashboard] fixs controls cause double fetch#237169

Merged
nreese merged 3 commits intoelastic:mainfrom
nreese:issue_237147
Oct 2, 2025
Merged

[dashboard] fixs controls cause double fetch#237169
nreese merged 3 commits intoelastic:mainfrom
nreese:issue_237147

Conversation

@nreese
Copy link
Contributor

@nreese nreese commented Oct 1, 2025

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

  • 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
    Screenshot 2025-10-01 at 12 39 45 PM

@nreese
Copy link
Contributor Author

nreese commented Oct 1, 2025

/ci

@nreese
Copy link
Contributor Author

nreese commented Oct 1, 2025

/ci

@nreese
Copy link
Contributor Author

nreese commented Oct 1, 2025

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Oct 1, 2025

/ci

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 660.4KB 660.8KB +435.0B

History

@nreese nreese marked this pull request as ready for review October 2, 2025 12:59
@nreese nreese requested a review from a team as a code owner October 2, 2025 12:59
@nreese nreese added release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// backport:version Backport to applied version labels v9.2.0 v9.3.0 labels Oct 2, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice unit test!

@nreese nreese merged commit 7f7bd4f into elastic:main Oct 2, 2025
29 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.1, 9.2

https://github.com/elastic/kibana/actions/runs/18199570117

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 2, 2025
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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [TSVB] Fix missing unsaved changes on linked visualizations (#228685)
9.1 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.1:
- [TSVB] Fix missing unsaved changes on linked visualizations (#228685)
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 237169

Questions ?

Please refer to the Backport tool documentation

nreese added a commit to nreese/kibana that referenced this pull request Oct 2, 2025
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
nreese added a commit to nreese/kibana that referenced this pull request Oct 2, 2025
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
@nreese
Copy link
Contributor Author

nreese commented Oct 2, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

nreese added a commit to nreese/kibana that referenced this pull request Oct 2, 2025
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
nreese added a commit that referenced this pull request Oct 2, 2025
# 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-->
nreese added a commit that referenced this pull request Oct 2, 2025
# 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-->
nreese added a commit that referenced this pull request Oct 2, 2025
# 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>
kibanamachine added a commit that referenced this pull request Oct 3, 2025
# 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>
@mistic mistic removed the v9.1.5 label Oct 6, 2025
@mistic mistic added v8.18.9 and removed v8.18.8 labels Oct 7, 2025
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v8.18.9 v8.19.5 v9.1.6 v9.2.0 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Controls] Controls cause double fetch

5 participants