Skip to content

Commit

Permalink
[8.16] [AI Assistant] Enable Search in Solution View (#199137) (#199358)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.16`:
- [[AI Assistant] Enable Search in Solution View
(#199137)](#199137)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Sander
Philipse","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T18:12:33Z","message":"[AI
Assistant] Enable Search in Solution View (#199137)\n\n##
Summary\r\n\r\nThis enables the Search solution in the Observability
solution view, so\r\nthat connectors (which are required for the AI
Assistant) are
available.","sha":"17db651a058795ef866ee610d950bfada91c840a","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","v8.16.0","backport:version","v8.17.0"],"title":"[AI
Assistant] Enable Search in Solution
View","number":199137,"url":"https://github.com/elastic/kibana/pull/199137","mergeCommit":{"message":"[AI
Assistant] Enable Search in Solution View (#199137)\n\n##
Summary\r\n\r\nThis enables the Search solution in the Observability
solution view, so\r\nthat connectors (which are required for the AI
Assistant) are
available.","sha":"17db651a058795ef866ee610d950bfada91c840a"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199137","number":199137,"mergeCommit":{"message":"[AI
Assistant] Enable Search in Solution View (#199137)\n\n##
Summary\r\n\r\nThis enables the Search solution in the Observability
solution view, so\r\nthat connectors (which are required for the AI
Assistant) are
available.","sha":"17db651a058795ef866ee610d950bfada91c840a"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sander Philipse <[email protected]>
  • Loading branch information
kibanamachine and sphilipse authored Nov 7, 2024
1 parent e079cab commit e8ef34c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,12 @@ describe('capabilitiesSwitcher', () => {
{
space.solution = 'oblt';

// It should disable enterpriseSearch and securitySolution features
// which correspond to feature_1 and feature_3
// It should disable securitySolution features
// which corresponds to feature_3
const result = await switcher(request, capabilities, false);

const expectedCapabilities = buildCapabilities();

expectedCapabilities.feature_1.bar = false;
expectedCapabilities.feature_1.foo = false;
expectedCapabilities.feature_3.bar = false;
expectedCapabilities.feature_3.foo = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('#withSpaceSolutionDisabledFeatures', () => {
});

describe('when the space solution is "oblt"', () => {
test('it removes the "search" and "security" features', () => {
test('it removes the "security" features', () => {
const spaceDisabledFeatures: string[] = [];
const spaceSolution = 'oblt';

Expand All @@ -68,7 +68,7 @@ describe('#withSpaceSolutionDisabledFeatures', () => {
spaceSolution
);

expect(result).toEqual(['feature2', 'feature3']);
expect(result).toEqual(['feature3']);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function withSpaceSolutionDisabledFeatures(
]).filter((featureId) => !enabledFeaturesPerSolution.es.includes(featureId));
} else if (spaceSolution === 'oblt') {
disabledFeatureKeysFromSolution = getFeatureIdsForCategories(features, [
'enterpriseSearch',
'securitySolution',
]).filter((featureId) => !enabledFeaturesPerSolution.oblt.includes(featureId));
} else if (spaceSolution === 'security') {
Expand Down

0 comments on commit e8ef34c

Please sign in to comment.