From 658ecea7874f2f84d26f3f29fdc5a49125f70313 Mon Sep 17 00:00:00 2001
From: Samiul Monir <150824886+Samiul-TheSoccerFan@users.noreply.github.com>
Date: Wed, 23 Oct 2024 15:29:17 -0400
Subject: [PATCH] Update Preconfigured Endpoint Names (#197498)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
Updates the preconfigured names as backend changes are merged.
![Screenshot 2024-10-23 at 12 15
18 PM](https://github.com/user-attachments/assets/1cec2662-8176-4262-883c-759ae50d8106)
### Checklist
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
---
.../components/all_inference_endpoints/constants.ts | 4 ++--
.../render_actions/actions/delete/delete_action.test.tsx | 2 +-
.../all_inference_endpoints/tabular_page.test.tsx | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts
index 26b6a93cec9fa..37c65ebb9a314 100644
--- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts
+++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/constants.ts
@@ -36,6 +36,6 @@ export const DEFAULT_INFERENCE_ENDPOINTS_TABLE_STATE: AllInferenceEndpointsTable
export const PIPELINE_URL = 'ingest/ingest_pipelines';
export const PRECONFIGURED_ENDPOINTS = {
- ELSER: '.elser-2',
- E5: '.multi-e5-small',
+ ELSER: '.elser-2-elasticsearch',
+ E5: '.multilingual-e5-small-elasticsearch',
};
diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.test.tsx
index 22c509ca22989..f5f4a0b7e8bdc 100644
--- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.test.tsx
+++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.test.tsx
@@ -44,7 +44,7 @@ describe('Delete Action', () => {
});
it('disable the delete action for preconfigured endpoint', () => {
- const preconfiguredMockItem = { ...mockItem, endpoint: '.elser-2' };
+ const preconfiguredMockItem = { ...mockItem, endpoint: '.multilingual-e5-small-elasticsearch' };
render();
expect(screen.getByTestId('inferenceUIDeleteAction')).toBeDisabled();
diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx
index 91cc303ed4568..85718478f65fd 100644
--- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx
+++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx
@@ -46,7 +46,7 @@ const inferenceEndpoints = [
task_settings: {},
},
{
- inference_id: '.elser-2',
+ inference_id: '.elser-2-elasticsearch',
task_type: 'sparse_embedding',
service: 'elasticsearch',
service_settings: {
@@ -57,7 +57,7 @@ const inferenceEndpoints = [
task_settings: {},
},
{
- inference_id: '.multi-e5-small',
+ inference_id: '.multilingual-e5-small-elasticsearch',
task_type: 'text_embedding',
service: 'elasticsearch',
service_settings: {
@@ -80,8 +80,8 @@ describe('When the tabular page is loaded', () => {
render();
const rows = screen.getAllByRole('row');
- expect(rows[1]).toHaveTextContent('.elser-2');
- expect(rows[2]).toHaveTextContent('.multi-e5-small');
+ expect(rows[1]).toHaveTextContent('.elser-2-elasticsearch');
+ expect(rows[2]).toHaveTextContent('.multilingual-e5-small-elasticsearch');
expect(rows[3]).toHaveTextContent('local-model');
expect(rows[4]).toHaveTextContent('my-elser-model-05');
expect(rows[5]).toHaveTextContent('third-party-model');