[ML] Inference API disable partial search results#132362
[ML] Inference API disable partial search results#132362jonathan-buttner merged 9 commits intoelastic:mainfrom
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.
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.
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) |
| * 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.
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.