-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[8.x] [Entity Analytics] API changes for right placement of deleting the old component template (#199734) #200673
Merged
abhishekbhatia1710
merged 8 commits into
elastic:8.x
from
abhishekbhatia1710:backport/8.x/pr-199734
Nov 27, 2024
Merged
[8.x] [Entity Analytics] API changes for right placement of deleting the old component template (#199734) #200673
abhishekbhatia1710
merged 8 commits into
elastic:8.x
from
abhishekbhatia1710:backport/8.x/pr-199734
Nov 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d component template (elastic#199734) ## Summary - Delete the old component template after the index template has referenced to the new component template - Test cases for the same flow ```JSON # Let's assume this is 8.15.3 # Create the component template when Risk Score engine is initialised # Create the index template which references the created component template PUT /_component_template/.risk-score-mappings { "template": { "settings": { "number_of_shards": 1 }, "mappings": { "properties": { "timestamp": { "type": "date" }, "user": { "properties": { "id": { "type": "keyword" }, "name": { "type": "text" } } } } } }, "version": 1 } PUT /_index_template/.risk-score.risk-score-default-index-template { "index_patterns": [".risk-score.risk-score-default-index-template"], "template": { "settings": { "number_of_replicas": 1 } }, "composed_of": [".risk-score-mappings"], "priority": 100, "version": 1, "_meta": { "description": "Index template for indices with the pattern my_index-*" } } # The deployment is updated to 8.16 # User tries to enable the Entity store which init's the Risk Score engine (again!!) # Fails, but creates the component template and cannot update the index template to reference the new component template due to the error PUT /_component_template/.risk-score-mappings-default { "template": { "settings": { "number_of_shards": 1 }, "mappings": { "properties": { "timestamp": { "type": "date" }, "user": { "properties": { "id": { "type": "keyword" }, "name": { "type": "text" } } } } } }, "version": 1 } GET /_component_template?filter_path=component_templates.name&name=.risk-score-mappings* DELETE /_component_template/.risk-score-mappings # Fails # changed flow PUT /_index_template/.risk-score.risk-score-default-index-template { "index_patterns": [".risk-score.risk-score-default-index-template"], "template": { "settings": { "number_of_replicas": 1 } }, "composed_of": [".risk-score-mappings-default"], "priority": 100, "version": 1, "_meta": { "description": "Index template for indices with the pattern my_index-*" } } DELETE /_component_template/.risk-score-mappings # Succeeds ######### ``` ### Checklist Delete any items that are not applicable to this PR. - [ ] [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 - [ ] [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) (cherry picked from commit 771c139) # Conflicts: # x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts # x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/init_and_status_apis.ts
Merged
4 tasks
CAWilson94
approved these changes
Nov 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice!
💚 Build Succeeded
Metrics [docs]
History
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation
\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n"}}]}] BACKPORT-->