-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Inference API disable partial search results #132362
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
[ML] Inference API disable partial search results #132362
Conversation
|
Hi @jonathan-buttner, I've created a changelog YAML for you. |
| public static class LocalStateIndexSettingsInferencePlugin extends LocalStateCompositeXPackPlugin { | ||
| private final InferencePlugin inferencePlugin; | ||
|
|
||
| public LocalStateIndexSettingsInferencePlugin(final Settings settings, final Path configPath) throws Exception { |
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.
If you can think of a better way to direct the inference configuration index and secrets index to separate nodes let me know. I'm injecting some settings that won't be present in production but allows us to direct the documents to specific nodes for easier testing.
| assertThat(exception.toString(), containsString("Failed to load inference endpoint [test-index-id]")); | ||
|
|
||
| var causeException = exception.getCause(); | ||
| assertThat(causeException, instanceOf(SearchPhaseExecutionException.class)); |
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 tried adding more assertThat's for looking for certain text in the search phase execution exception, but they exact wording changes during my test runs and was causing the test to be flaky.
|
Pinging @elastic/ml-core (Team:ML) |
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.
LGTM
| * This allows tests to set additional settings for the inference index. | ||
| * @param extraSettings additional settings to apply to the inference index. | ||
| */ | ||
| public static Settings settingsForTesting(Settings extraSettings) { |
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.
Can the 2 settingsForTesting() functions be moved to the test code? That would keep this cleaner
…nathan-buttner/elasticsearch into inference-api-disable-partial-results
…cking * upstream/main: (24 commits) Revert "[Fleet] add privileges to `kibana_system` to read integrations data (elastic#132400)" (elastic#132499) ESQL: Rename evaluators for FIRST and LAST (elastic#132466) Add inference fields to semantic text docs (elastic#132471) ESQL: Allow FIRST and LAST as method name (elastic#132469) ESQL: Add javadoc for PushDownAndCombineFilters (elastic#132484) Misc cleanups in Coordinator (elastic#132452) [DiskBBQ] Write the maximum posting list size to avoid resizing the docId array (elastic#132447) Improve exception handling for JsonXContentParser (elastic#123439) Clarify quantization on semantic_text BBQ dense vector default (elastic#132470) Fix test infra NPE in doEnsureClusterStateConsistency (elastic#131859) Stabilize CancellableTasksIT#testRemoveBanParentsOnDisconnect (elastic#131858) Move ClusterApplierService assertion after logging exception (elastic#132446) ESQL: Support for multi-argument aggs (elastic#132424) Update wolfi (versioned) (elastic#132457) ESQL: Fix Function javadoc (elastic#132399) [ML] Inference API disable partial search results (elastic#132362) Unmute testTermsQuery tests (elastic#132409) Fix index lookup when field-caps returns empty mapping (elastic#132138) CompressorFactory.compressor (elastic#132448) ESQL add formatting to plans in javadoc (elastic#132421) ...
This PR disables partial search results when retrieving the inference endpoint information from the configuration and secrets index. This should bubble up the originating exception for the reason that the document from each index is not available. If an unexpected exception occurs it is wrapped in an
ElasticsearchExceptionto include the inference endpoint that is failing.