Skip to content

[Discover] Preserve data view references for by-value panels on dashboard save#256997

Merged
lukasolson merged 2 commits intoelastic:mainfrom
lukasolson:discover_sessions_as_code/fix_missing_references
Mar 11, 2026
Merged

[Discover] Preserve data view references for by-value panels on dashboard save#256997
lukasolson merged 2 commits intoelastic:mainfrom
lukasolson:discover_sessions_as_code/fix_missing_references

Conversation

@lukasolson
Copy link
Copy Markdown
Contributor

@lukasolson lukasolson commented Mar 10, 2026

Summary

Resolves #256943.

Fixes by-value Classic mode Discover Session panels failing to load after saving and reloading a dashboard (error: Could not find reference for kibanaSavedObjectMeta.searchSourceJSON.index). This was a bug introduced in #252786.

How to verify

This problem really only surfaces in the UX after the changes in #256293.

  1. Create a new dashboard → Add panel → Discover Session.
  2. Save a default Classic mode session and return to the dashboard.
  3. Save the dashboard and reload the page.
  4. The Discover session panel should load without the "Could not find reference" error.

@lukasolson lukasolson self-assigned this Mar 10, 2026
@lukasolson lukasolson requested a review from a team as a code owner March 10, 2026 21:17
@lukasolson lukasolson added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Mar 10, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Copy Markdown
Contributor

@Bluefinger Bluefinger left a comment

Choose a reason for hiding this comment

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

Tested the changes with #256293, so I can confirm this works and solves the issue there.

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ security / entity_store ] plugin / local-stateful-classic - Entity Store History Snapshot - history snapshot: copies latest to history index and resets behaviors on latest

Metrics [docs]

✅ unchanged

History

cc @lukasolson

@lukasolson lukasolson merged commit 12d2398 into elastic:main Mar 11, 2026
18 checks passed
sorenlouv pushed a commit that referenced this pull request Mar 17, 2026
…oard save (#256997)

## Summary

Resolves #256943.

Fixes by-value Classic mode Discover Session panels failing to load
after saving and reloading a dashboard (error: `Could not find reference
for kibanaSavedObjectMeta.searchSourceJSON.index`). This was a bug
introduced in #252786.

### How to verify

This problem really only surfaces in the UX after the changes in
#256293.

1. Create a new dashboard → Add panel → Discover Session.
2. Save a default Classic mode session and return to the dashboard.
3. Save the dashboard and reload the page.
4. The Discover session panel should load without the "Could not find
reference" error.

Co-authored-by: Gonçalo Rica Pais da Silva <goncalo.rica@elastic.co>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Mar 26, 2026
…oard save (elastic#256997)

## Summary

Resolves elastic#256943.

Fixes by-value Classic mode Discover Session panels failing to load
after saving and reloading a dashboard (error: `Could not find reference
for kibanaSavedObjectMeta.searchSourceJSON.index`). This was a bug
introduced in elastic#252786.

### How to verify

This problem really only surfaces in the UX after the changes in
elastic#256293.

1. Create a new dashboard → Add panel → Discover Session.
2. Save a default Classic mode session and return to the dashboard.
3. Save the dashboard and reload the page.
4. The Discover session panel should load without the "Could not find
reference" error.

Co-authored-by: Gonçalo Rica Pais da Silva <goncalo.rica@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover][Embeddable] By-Value Classic mode Discover session panels fail to load from saved dashboard

5 participants