Skip to content

Commit

Permalink
Kibana space scoped component-template for risk engine (elastic#197170)
Browse files Browse the repository at this point in the history
## Summary

The component template used when enabling the risk engine is not Kibana
space-agnostic, as the component template in every space is named
`.risk-score-mappings`. This caused issues during the cleanup process,
where it attempted to delete the same component template from each space
but failed because other spaces' index templates were still referencing
it.

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit b562288)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/init_and_status_apis.ts
  • Loading branch information
abhishekbhatia1710 committed Oct 29, 2024
1 parent 58c5d2c commit 782fa76
Show file tree
Hide file tree
Showing 4 changed files with 641 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export const riskScoreFieldMap: FieldMap = {
} as const;

export const mappingComponentName = '.risk-score-mappings';
export const nameSpaceAwareMappingsComponentName = (namespace: string): string => {
return `${mappingComponentName}-${namespace}`;
};
export const totalFieldsLimit = 1000;

export const getIndexPatternDataStream = (namespace: string): IIndexPatternString => ({
Expand Down
Loading

0 comments on commit 782fa76

Please sign in to comment.