Skip to content

Commit

Permalink
[8.x] [Search] Inference Endpoints - Align rendering to plugin (#203313
Browse files Browse the repository at this point in the history
…) (#203496)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search] Inference Endpoints - Align rendering to plugin
(#203313)](#203313)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T18:36:16Z","message":"[Search]
Inference Endpoints - Align rendering to plugin (#203313)\n\n##
Summary\r\n\r\nThis PR removes rendering of the Inference Endpoints UI
from\r\n`enterprise_search` for stack and instead utilizes
the\r\n`search_inference_endpoints` plugin to render the UI for both
serverless\r\nand stack. This can be done by utilizing the
`search_navigation` plugin\r\nfor rendering the classic navigation for
stack.\r\n\r\nTo support this change the
`xpack.searchInferenceEndpoints.ui.enabled`\r\nwas updated to default to
`true` instead of only being set for\r\nserverless search. To account
for this change I have added\r\n`xpack.searchInferenceEndpoints.enabled:
false` to the serverless\r\nconfigs for both security and observability
to ensure the\r\n`search_inference_endpoints` plugin is disabled in both
of those\r\nprojects.\r\n\r\n### Checklist\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] This was
checked for breaking HTTP API changes, and any breaking\r\nchanges have
been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebb4f503a5c9c0a3d883a706566920ae27fedfad","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor","v8.18.0"],"number":203313,"url":"https://github.com/elastic/kibana/pull/203313","mergeCommit":{"message":"[Search]
Inference Endpoints - Align rendering to plugin (#203313)\n\n##
Summary\r\n\r\nThis PR removes rendering of the Inference Endpoints UI
from\r\n`enterprise_search` for stack and instead utilizes
the\r\n`search_inference_endpoints` plugin to render the UI for both
serverless\r\nand stack. This can be done by utilizing the
`search_navigation` plugin\r\nfor rendering the classic navigation for
stack.\r\n\r\nTo support this change the
`xpack.searchInferenceEndpoints.ui.enabled`\r\nwas updated to default to
`true` instead of only being set for\r\nserverless search. To account
for this change I have added\r\n`xpack.searchInferenceEndpoints.enabled:
false` to the serverless\r\nconfigs for both security and observability
to ensure the\r\n`search_inference_endpoints` plugin is disabled in both
of those\r\nprojects.\r\n\r\n### Checklist\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] This was
checked for breaking HTTP API changes, and any breaking\r\nchanges have
been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebb4f503a5c9c0a3d883a706566920ae27fedfad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203313","number":203313,"mergeCommit":{"message":"[Search]
Inference Endpoints - Align rendering to plugin (#203313)\n\n##
Summary\r\n\r\nThis PR removes rendering of the Inference Endpoints UI
from\r\n`enterprise_search` for stack and instead utilizes
the\r\n`search_inference_endpoints` plugin to render the UI for both
serverless\r\nand stack. This can be done by utilizing the
`search_navigation` plugin\r\nfor rendering the classic navigation for
stack.\r\n\r\nTo support this change the
`xpack.searchInferenceEndpoints.ui.enabled`\r\nwas updated to default to
`true` instead of only being set for\r\nserverless search. To account
for this change I have added\r\n`xpack.searchInferenceEndpoints.enabled:
false` to the serverless\r\nconfigs for both security and observability
to ensure the\r\n`search_inference_endpoints` plugin is disabled in both
of those\r\nprojects.\r\n\r\n### Checklist\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] This was
checked for breaking HTTP API changes, and any breaking\r\nchanges have
been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"ebb4f503a5c9c0a3d883a706566920ae27fedfad"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
TattdCodeMonkey and kibanamachine authored Dec 9, 2024
1 parent 2e343ca commit 817930f
Show file tree
Hide file tree
Showing 45 changed files with 133 additions and 562 deletions.
3 changes: 0 additions & 3 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ xpack.ml.compatibleModuleType: 'search'

data_visualizer.resultLinks.fileBeat.enabled: false

# Search InferenceEndpoints
xpack.searchInferenceEndpoints.ui.enabled: true

# Search Notebooks
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json

Expand Down
1 change: 1 addition & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ xpack.uptime.enabled: true
xpack.securitySolution.enabled: false
xpack.search.notebooks.enabled: false
xpack.searchPlayground.enabled: false
xpack.searchInferenceEndpoints.enabled: false

## Fine-tune the observability solution feature privileges. Also, refer to `serverless.yml` for the project-agnostic overrides.
xpack.features.overrides:
Expand Down
1 change: 1 addition & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ xpack.observability.enabled: false
xpack.observabilityAIAssistant.enabled: false
xpack.search.notebooks.enabled: false
xpack.searchPlayground.enabled: false
xpack.searchInferenceEndpoints.enabled: false

## Fine-tune the security solution feature privileges. Also, refer to `serverless.yml` for the project-agnostic overrides.
xpack.features.overrides:
Expand Down
1 change: 0 additions & 1 deletion packages/deeplinks/search/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

export const ENTERPRISE_SEARCH_APP_ID = 'enterpriseSearch';
export const ENTERPRISE_SEARCH_CONTENT_APP_ID = 'enterpriseSearchContent';
export const ENTERPRISE_SEARCH_RELEVANCE_APP_ID = 'searchInferenceEndpoints';
export const ENTERPRISE_SEARCH_APPLICATIONS_APP_ID = 'enterpriseSearchApplications';
export const ENTERPRISE_SEARCH_ANALYTICS_APP_ID = 'enterpriseSearchAnalytics';
export const ENTERPRISE_SEARCH_APPSEARCH_APP_ID = 'appSearch';
Expand Down
7 changes: 2 additions & 5 deletions packages/deeplinks/search/deep_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID,
Expand All @@ -32,7 +31,6 @@ import {
export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID;
export type EnterpriseSearchContentApp = typeof ENTERPRISE_SEARCH_CONTENT_APP_ID;
export type EnterpriseSearchApplicationsApp = typeof ENTERPRISE_SEARCH_APPLICATIONS_APP_ID;
export type EnterpriseSearchRelevanceApp = typeof ENTERPRISE_SEARCH_RELEVANCE_APP_ID;
export type EnterpriseSearchAnalyticsApp = typeof ENTERPRISE_SEARCH_ANALYTICS_APP_ID;
export type EnterpriseSearchAppsearchApp = typeof ENTERPRISE_SEARCH_APPSEARCH_APP_ID;
export type EnterpriseSearchWorkplaceSearchApp = typeof ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID;
Expand All @@ -54,15 +52,14 @@ export type ApplicationsLinkId = 'searchApplications';

export type AppsearchLinkId = 'engines';

export type RelevanceLinkId = 'inferenceEndpoints';
export type SearchInferenceEndpointsLinkId = 'inferenceEndpoints';

export type SearchIndicesLinkId = typeof SEARCH_INDICES_CREATE_INDEX;

export type DeepLinkId =
| EnterpriseSearchApp
| EnterpriseSearchContentApp
| EnterpriseSearchApplicationsApp
| EnterpriseSearchRelevanceApp
| EnterpriseSearchAnalyticsApp
| EnterpriseSearchAppsearchApp
| EnterpriseSearchWorkplaceSearchApp
Expand All @@ -74,7 +71,7 @@ export type DeepLinkId =
| `${EnterpriseSearchContentApp}:${ContentLinkId}`
| `${EnterpriseSearchApplicationsApp}:${ApplicationsLinkId}`
| `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}`
| `${EnterpriseSearchRelevanceApp}:${RelevanceLinkId}`
| `${SearchInferenceEndpointsId}:${SearchInferenceEndpointsLinkId}`
| SearchStart
| SearchIndices
| SearchElasticsearch
Expand Down
1 change: 0 additions & 1 deletion packages/deeplinks/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
Expand Down
17 changes: 0 additions & 17 deletions x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import dedent from 'dedent';
import {
ENTERPRISE_SEARCH_APP_ID,
ENTERPRISE_SEARCH_CONTENT_APP_ID,
ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
ENTERPRISE_SEARCH_APPLICATIONS_APP_ID,
ENTERPRISE_SEARCH_ANALYTICS_APP_ID,
ENTERPRISE_SEARCH_APPSEARCH_APP_ID,
Expand Down Expand Up @@ -200,22 +199,6 @@ export const SEMANTIC_SEARCH_PLUGIN = {
URL: '/app/enterprise_search/semantic_search',
};

export const SEARCH_RELEVANCE_PLUGIN = {
ID: ENTERPRISE_SEARCH_RELEVANCE_APP_ID,
NAME: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.productName', {
defaultMessage: 'Inference Endpoints',
}),
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.navTitle', {
defaultMessage: 'Relevance',
}),
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.inferenceEndpoints.description', {
defaultMessage: 'Manage your inference endpoints for semantic search and AI use cases.',
}),
URL: '/app/elasticsearch/relevance',
LOGO: 'logoEnterpriseSearch',
SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/',
};

export const CREATE_CONNECTOR_PLUGIN = {
CLI_SNIPPET: dedent`./bin/connectors connector create
--index-name my-index
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/enterprise_search/common/locators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
*/

import type { SharePluginSetup } from '@kbn/share-plugin/public';
import { SerializableRecord } from '@kbn/utility-types';

import {
CreateIndexLocatorDefinition,
type CreateIndexLocatorParams,
} from './create_index_locator';
import { SearchInferenceEndpointLocatorDefinition } from './inference_locator';

export function registerLocators(share: SharePluginSetup) {
share.url.locators.create<CreateIndexLocatorParams>(new CreateIndexLocatorDefinition());
share.url.locators.create<SerializableRecord>(new SearchInferenceEndpointLocatorDefinition());
}

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/plugins/enterprise_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"guidedOnboarding",
"console",
"searchConnectors",
"searchInferenceEndpoints",
"searchNavigation",
"searchPlayground",
"embeddable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export const mockKibanaValues = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchInferenceEndpoints: null,
security: securityMock.createStart(),
setBreadcrumbs: jest.fn(),
setChromeIsVisible: jest.fn(),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 817930f

Please sign in to comment.