Skip to content

[8.x] [Dashboard] Remove mSearch from content management (#210709)#217561

Merged
nickpeihl merged 1 commit intoelastic:8.xfrom
nickpeihl:backport/8.x/pr-210709
Apr 9, 2025
Merged

[8.x] [Dashboard] Remove mSearch from content management (#210709)#217561
nickpeihl merged 1 commit intoelastic:8.xfrom
nickpeihl:backport/8.x/pr-210709

Conversation

@nickpeihl
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Removes the mSearch method from Dashboard content management.

The `mSearch` content management method was designed to be a temporary
implementation of search that allowed searching multiple saved object
types ([see more
[internal]](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit?tab=t.0#heading=h.6sj4n6bjcgp5)).
However, the mSearch implementation in the Dashboard Storage class lacks
extensibility as it requires a synchronous `toItemResult` function. As
we start migrating reference handling to the server, we will likely need
transforms that return Promises (ex. `savedObjectToItem`), such as
[retrieving tag saved objects from the SavedObjectTagging
client](elastic#210619).

The Dashboard `mSearch` method was only used by the dashboard_picker and
this PR replaces its usage with the `search` method.

### Identify risks

There is a slight risk in serverless environments where a browser may
have already loaded the dashboard_picker module but lags behind the
server. In this case, the dashboard picker may fail to retrieve a list
of dashboards due to it calling the now non-existent `mSearch` method
provided by the server. In this case, the user simply needs to refresh
their browser to retrieve the latest UI modules.

(cherry picked from commit 2a7e38b)
@nickpeihl nickpeihl requested a review from kibanamachine as a code owner April 8, 2025 16:26
@nickpeihl nickpeihl added the backport This PR is a backport of another PR label Apr 8, 2025
@nickpeihl nickpeihl enabled auto-merge (squash) April 8, 2025 16:26
@elasticmachine
Copy link
Copy Markdown
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
presentationUtil 76.2KB 76.2KB -36.0B

Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

LGTM
code review only

@nickpeihl nickpeihl merged commit 270847f into elastic:8.x Apr 9, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants