From cc79e26705cbfca72c26a8e7ccd9ab9018c4d795 Mon Sep 17 00:00:00 2001 From: Samiul Monir Date: Wed, 23 Oct 2024 12:15:42 -0400 Subject: [PATCH 1/2] updating default endpoints name --- .../public/components/all_inference_endpoints/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 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', }; From 1fd63ebb42b6e8fb2cdd186b83a28edcfb9ac8ce Mon Sep 17 00:00:00 2001 From: Samiul Monir Date: Wed, 23 Oct 2024 12:29:43 -0400 Subject: [PATCH 2/2] fixing tests --- .../render_actions/actions/delete/delete_action.test.tsx | 2 +- .../all_inference_endpoints/tabular_page.test.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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');