Skip to content
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

[Discover] Migrate session session initialization to state container #156957

Merged

Conversation

kertal
Copy link
Member

@kertal kertal commented May 8, 2023

Summary

Follow up of #153528, migrate useSearchSession to state container's initializeAndSync function, to remove another hook that's redundant now.

Checklist

@kertal
Copy link
Member Author

kertal commented May 15, 2023

@elasticmachine merge upstream

@kertal kertal self-assigned this May 15, 2023
@kertal kertal added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes labels May 15, 2023
@kertal kertal marked this pull request as ready for review May 15, 2023 07:33
@kertal kertal requested a review from a team as a code owner May 15, 2023 07:33
@elasticmachine
Copy link
Contributor

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

@kertal
Copy link
Member Author

kertal commented May 22, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 460 459 -1

Async chunks

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

id before after diff
discover 421.9KB 421.7KB -170.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kertal

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

createSearchSessionRestorationDataProvider({
appStateContainer,
data: services.data,
getSavedSearch: () => savedSearchContainer.getState(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Wonder if this logic should be executed again when savedSearchContainer state changes.

Copy link
Member Author

@kertal kertal May 22, 2023

Choose a reason for hiding this comment

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

It's just using id and name of a saved search when it's needed to name a search session ...

So it should be fine, but I bet this code can be improved a bit in the future :)

@kertal kertal merged commit ef678f3 into elastic:main May 22, 2023
@kibanamachine kibanamachine added v8.9.0 backport:skip This commit does not require backporting labels May 22, 2023
delanni pushed a commit to delanni/kibana that referenced this pull request May 25, 2023
…lastic#156957)

## Summary

Migrate `useSearchSession` to state container's `initializeAndSync` function, to remove another `hook`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants