-
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
[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist #201140
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
@@ -241,19 +241,19 @@ export class EntityStoreDataClient { | |||
) { | |||
const setupStartTime = moment().utc().toISOString(); | |||
const { logger, namespace, appClient, dataViewsService } = this.options; | |||
const indexPatterns = await buildIndexPatterns(namespace, appClient, dataViewsService); | |||
try { |
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.
this is the fix, move the try
higher :D
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.
uuugh, this is why i dont like try/catch blocks!
I remember fixing an issue a couple weeks back caused by the exact same thing
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.
Tested locally, seems to be working well! Awesome stuff!
Approving, but build is failing, looks like it's related to the test changes in this PR
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @hop-dev |
Starting backport for target branches: 8.16, 8.17, 8.x |
…ata view does not exist (elastic#201140) ## Summary Fixes a bug where if the securite default data view does not exist the entity engine would get stuck in 'installing' status. After this fix, the engine is put into 'error' state. The entity engine uses the security default data view by default to generate it's source index pattern. ## Testing 1. Delete the security default data view `security-solution-default` 2. Init the entity store 3. Observe that the entity store is in an error state (the UI should show the error) (cherry picked from commit c3c872c)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…e if data view does not exist (#201140) (#201414) # Backport This will backport the following commits from `main` to `8.x`: - [[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist (#201140)](#201140) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mark Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-22T15:09:23Z","message":"[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist (#201140)\n\n## Summary\n\nFixes a bug where if the securite default data view does not exist the\nentity engine would get stuck in 'installing' status. After this fix,\nthe engine is put into 'error' state.\n\nThe entity engine uses the security default data view by default to\ngenerate it's source index pattern.\n\n## Testing\n\n1. Delete the security default data view `security-solution-default`\n2. Init the entity store\n3. Observe that the entity store is in an error state (the UI should\nshow the error)","sha":"c3c872c6da7ca1cf3fd90ef13ce6ae758c53c9e8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team: SecuritySolution","Team:Entity Analytics","backport:version","v8.17.0","v8.18.0","v8.16.2"],"title":"[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist","number":201140,"url":"https://github.com/elastic/kibana/pull/201140","mergeCommit":{"message":"[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist (#201140)\n\n## Summary\n\nFixes a bug where if the securite default data view does not exist the\nentity engine would get stuck in 'installing' status. After this fix,\nthe engine is put into 'error' state.\n\nThe entity engine uses the security default data view by default to\ngenerate it's source index pattern.\n\n## Testing\n\n1. Delete the security default data view `security-solution-default`\n2. Init the entity store\n3. Observe that the entity store is in an error state (the UI should\nshow the error)","sha":"c3c872c6da7ca1cf3fd90ef13ce6ae758c53c9e8"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201140","number":201140,"mergeCommit":{"message":"[Entity Analytics][Entity Store] Init: Put engine in error state if data view does not exist (#201140)\n\n## Summary\n\nFixes a bug where if the securite default data view does not exist the\nentity engine would get stuck in 'installing' status. After this fix,\nthe engine is put into 'error' state.\n\nThe entity engine uses the security default data view by default to\ngenerate it's source index pattern.\n\n## Testing\n\n1. Delete the security default data view `security-solution-default`\n2. Init the entity store\n3. Observe that the entity store is in an error state (the UI should\nshow the error)","sha":"c3c872c6da7ca1cf3fd90ef13ce6ae758c53c9e8"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Mark Hopkin <[email protected]>
…ata view does not exist (elastic#201140) ## Summary Fixes a bug where if the securite default data view does not exist the entity engine would get stuck in 'installing' status. After this fix, the engine is put into 'error' state. The entity engine uses the security default data view by default to generate it's source index pattern. ## Testing 1. Delete the security default data view `security-solution-default` 2. Init the entity store 3. Observe that the entity store is in an error state (the UI should show the error)
…ata view does not exist (elastic#201140) ## Summary Fixes a bug where if the securite default data view does not exist the entity engine would get stuck in 'installing' status. After this fix, the engine is put into 'error' state. The entity engine uses the security default data view by default to generate it's source index pattern. ## Testing 1. Delete the security default data view `security-solution-default` 2. Init the entity store 3. Observe that the entity store is in an error state (the UI should show the error)
Summary
Fixes a bug where if the securite default data view does not exist the entity engine would get stuck in 'installing' status. After this fix, the engine is put into 'error' state.
The entity engine uses the security default data view by default to generate it's source index pattern.
Testing
security-solution-default