Refactor, deangularize courier/search source#45235
Merged
lukasolson merged 38 commits intoelastic:masterfrom Oct 18, 2019
Merged
Refactor, deangularize courier/search source#45235lukasolson merged 38 commits intoelastic:masterfrom
lukasolson merged 38 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-app-arch |
lukasolson
commented
Sep 10, 2019
|
|
||
| await respondToSearchRequests(responsesInOriginalRequestOrder); | ||
| } catch(error) { | ||
| if (errorAllowExplicitIndex.test(error)) { |
Contributor
Author
There was a problem hiding this comment.
Right now if you set rest.action.multi.allow_explicit_index to false in your elasticsearch.yml, a lot of things are broken (including the saved objects client and add sample data). I don't see any reason to explicitly handle this here because the apps also rely on the saved objects client, which doesn't handle this. Maybe we should open an issue to better handle this scenario from a higher level.
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💚 Build Succeeded |
Contributor
💚 Build Succeeded |
Contributor
💚 Build Succeeded |
Contributor
💔 Build Failed |
Contributor
💚 Build Succeeded |
Contributor
💚 Build Succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR prepares search source for migration to the new platform and to the new search APIs.
Resolves #44659.
Resolves #44738.
Removal of search request
The
SearchRequestmodule added a lot of complications to the way requests were processed, and included behavior that was never used (like lifecycle events andcontinueIncomplete). It was a confusing construct that had two different promises that might resolve at any given point but really just represented a success or a failure. This PR removes theSearchRequestclass (in addition toRequestStatusandIsRequest) and instead passes the actual Elasticsearch request DSL object directly to the search strategy.Removal of search request queue
This was really just an array, and was only helpful when courier was destroyed so all current requests could be aborted. Now it's the responsibility of the caller of
fetchto abort the request. The array of requests to process can now be found infetchSoon.Allow passing
abortSignaltosearchSource.fetchThis PR removes the previous way for a search source to abort an in-progress request,
cancelQueued, in favor of passing anabortSignalto thefetchmethod. This allows the caller offetchto more easily control when a request should be aborted, and is in line with how we handle aborting other things (like the interpreter and ES cluster client).Refactoring of
callClientThe
callClientmodule used to do things in a very funky way. It would conditionally respond to requests with either a response, or anABORTEDconstant. This caused a lot of conditional handling or requests/responses. Now, instead of responding with disparate values, it will eitherresolvewith the response orrejectwith an error, which in the case of an aborted request, is anAbortError.For testers
This PR affects the querying of Elasticsearch in many places that should be tested:
It's also important to test these areas in conjunction with other things that affect the Elasticsearch query, like KQL/Lucene, filters, and time ranges (including auto-refresh intervals).
It also affects the creation of new index patterns, which should also be tested.
Checklist
For maintainers