-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Clean up search service #53766
Clean up search service #53766
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
💔 Build FailedTo update your PR or re-run it, just comment with: |
💔 Build FailedTo update your PR or re-run it, just comment with: |
💔 Build FailedTo update your PR or re-run it, just comment with: |
💔 Build FailedTo update your PR or re-run it, just comment with: |
💔 Build FailedTo update your PR or re-run it, just comment with: |
…kibana into newplatform/data/search-msearch
const customPromiseThingy = esClient[method](args); | ||
const { abort } = customPromiseThingy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is @spalger approved 🤣
@@ -51,6 +53,9 @@ declare module 'kibana/public' { | |||
|
|||
export interface ISearchStart { | |||
search: ISearchGeneric; | |||
__LEGACY: { | |||
esClient: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be any
? I think we have a type for this (APICaller
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a follow up PR doing that https://github.com/elastic/kibana/pull/54337/files#diff-c55654fe5ffdab0adcd2c5bda2f863e0R52
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…kibana into newplatform/data/search-msearch
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* deprecate msearch * Missing export * adjust tests, revert loading method of esaggs/boot * getInjectedMetadata * Fix jest tests * update default strategy abort test * notice update * Allow running discover errors test independently * Remove batchSearches * Detect painless script error * don't show notifications for aborted requests * Fix jest tests * Restore loader indicator * Decreace loading count on error * update search test * Trigger digest after fetching fresh index patterns * Revert isEqual * accurate revert * Return full error details to client from search endpoint * Re-throw AbortError from http when user aborts request. * fix typo * typo * Adjust routes jest test * Restore msearch using a separate es connection * typescript fixes * set http service mock * Move es client to dat aplugin, for follow up PR * Add karma mock * krma mock * fix tests * ts * Pass in version dynamically * add headers to esClient host * Restored fetch soon test Use tap for loadingCount side effects * Cleanup search params * Cleanup search params test * Revert "Cleanup search params" This reverts commit ca9dea0. * Revert "Cleanup search params test" This reverts commit 30b9478. * Revert code to use old es client until elastic#44302 is resolved * Revert changes to getPainlessError * Fix jest test * Refactor esClient to trigger loadingIndicator * fixing tests * use esClient from searchService * git remove comment * fix jest Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* deprecate msearch * Missing export * adjust tests, revert loading method of esaggs/boot * getInjectedMetadata * Fix jest tests * update default strategy abort test * notice update * Allow running discover errors test independently * Remove batchSearches * Detect painless script error * don't show notifications for aborted requests * Fix jest tests * Restore loader indicator * Decreace loading count on error * update search test * Trigger digest after fetching fresh index patterns * Revert isEqual * accurate revert * Return full error details to client from search endpoint * Re-throw AbortError from http when user aborts request. * fix typo * typo * Adjust routes jest test * Restore msearch using a separate es connection * typescript fixes * set http service mock * Move es client to dat aplugin, for follow up PR * Add karma mock * krma mock * fix tests * ts * Pass in version dynamically * add headers to esClient host * Restored fetch soon test Use tap for loadingCount side effects * Cleanup search params * Cleanup search params test * Revert "Cleanup search params" This reverts commit ca9dea0. * Revert "Cleanup search params test" This reverts commit 30b9478. * Revert code to use old es client until #44302 is resolved * Revert changes to getPainlessError * Fix jest test * Refactor esClient to trigger loadingIndicator * fixing tests * use esClient from searchService * git remove comment * fix jest Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Partially resolves #46934.
As #44302 won't allow us to switch over to the new service, this PR contains all the changes necessary to make the switch, but without actually making it.
New search service & further improvements
This PR contains tested infrastructure for the new
data.searchService
.es
service indefault_search_strategy.ts
with a non-angular one and removes any angular \ old platform dependencies from search source and default search strategy, to allow moving them to NP.LoadingIndicator
handling - show loading indicator while searchingsearch
routegetPainlessError
is processed due to slightly different response from new endpoint.AbortError
to be thrown directly fromhttp
service @elastic/kibana-platform for your reviewmaps
, as its now not being triggered automatically byelasticsearch
client.test/functional/apps/discover/_errors.js
that allows running it independentlyChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers