Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kibana space scoped component-template for risk engine #197170

Conversation

abhishekbhatia1710
Copy link
Contributor

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

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@abhishekbhatia1710 abhishekbhatia1710 changed the title Initial commit for compTemplate not spacescoped Kibana space scoped component-template for risk engine Oct 22, 2024
@abhishekbhatia1710 abhishekbhatia1710 added 8.17 candidate backport:version Backport to applied version labels labels Oct 22, 2024
Copy link
Contributor

@tiansivive tiansivive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #73 / Entity Analytics - Risk Engine @ess @serverless @serverlessQA init_and_status_apis status api should disable / enable risk engine

Metrics [docs]

✅ unchanged

History

cc @abhishekbhatia1710

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7205

[✅] x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/configs/serverless.config.ts: 2/2 tests passed.

see run history

@abhishekbhatia1710 abhishekbhatia1710 merged commit b562288 into elastic:main Oct 22, 2024
51 checks passed
@kibanamachine kibanamachine added v9.0.0 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 22, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 197170 locally

@abhishekbhatia1710 abhishekbhatia1710 removed backport missing Added to PRs automatically when the are determined to be missing a backport. 8.17 candidate labels Oct 24, 2024
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 25, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 197170 locally

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 197170 locally

@abhishekbhatia1710
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

abhishekbhatia1710 added a commit to abhishekbhatia1710/kibana that referenced this pull request Oct 29, 2024
## 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
abhishekbhatia1710 added a commit that referenced this pull request Oct 29, 2024
… (#198110)

# Backport

This will backport the following commits from `main` to `8.16`:
- [Kibana space scoped component-template for risk engine
(#197170)](#197170)

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

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

<!--BACKPORT [{"author":{"name":"Abhishek
Bhatia","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T15:45:52Z","message":"Kibana
space scoped component-template for risk engine (#197170)\n\n##
Summary\r\n\r\nThe component template used when enabling the risk engine
is not Kibana\r\nspace-agnostic, as the component template in every
space is named\r\n`.risk-score-mappings`. This caused issues during the
cleanup process,\r\nwhere it attempted to delete the same component
template from each space\r\nbut failed because other spaces' index
templates were still referencing\r\nit.\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [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- [x] [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\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n-
[ ] This will appear in the **Release Notes** and follow
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"b562288289f326084511c68759db84e20cee2791","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport
missing","v9.0.0","Team:Entity
Analytics","backport:version"],"number":197170,"url":"https://github.com/elastic/kibana/pull/197170","mergeCommit":{"message":"Kibana
space scoped component-template for risk engine (#197170)\n\n##
Summary\r\n\r\nThe component template used when enabling the risk engine
is not Kibana\r\nspace-agnostic, as the component template in every
space is named\r\n`.risk-score-mappings`. This caused issues during the
cleanup process,\r\nwhere it attempted to delete the same component
template from each space\r\nbut failed because other spaces' index
templates were still referencing\r\nit.\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [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- [x] [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\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n-
[ ] This will appear in the **Release Notes** and follow
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"b562288289f326084511c68759db84e20cee2791"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197170","number":197170,"mergeCommit":{"message":"Kibana
space scoped component-template for risk engine (#197170)\n\n##
Summary\r\n\r\nThe component template used when enabling the risk engine
is not Kibana\r\nspace-agnostic, as the component template in every
space is named\r\n`.risk-score-mappings`. This caused issues during the
cleanup process,\r\nwhere it attempted to delete the same component
template from each space\r\nbut failed because other spaces' index
templates were still referencing\r\nit.\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [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- [x] [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\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n-
[ ] This will appear in the **Release Notes** and follow
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"b562288289f326084511c68759db84e20cee2791"}}]}]
BACKPORT-->
@kibanamachine kibanamachine added v8.16.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:fix Team:Entity Analytics Security Entity Analytics Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants