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

[Entity Analytics][Entity Store] Clear error on second entity engine init API call #202903

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Dec 4, 2024

Summary

If the first call to init an entity engine fails, we add the error property to the engine status, if we then call the API a second time this error was not being wiped. This PR resets the error on the second call.

Test steps

  • Do not visit the UI of a kibana so that the security default data view does not exist
  • Call the init API for an entity engine e,g host
  • Call the engine status API, notice the status has an error
  • Visait the security solution UI and wait for the data view to be created
  • Re-call the init API and notice the error has gone

@hop-dev hop-dev added release_note:fix Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Entity Analytics Security Entity Analytics Team backport:version Backport to applied version labels v8.17.0 v8.18.0 labels Dec 4, 2024
@hop-dev hop-dev self-assigned this Dec 4, 2024
@hop-dev hop-dev requested a review from a team as a code owner December 4, 2024 12:16
@hop-dev hop-dev requested a review from tiansivive December 4, 2024 12:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

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

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

Code LGTM!

@hop-dev hop-dev enabled auto-merge (squash) December 4, 2024 13:14
@hop-dev hop-dev merged commit 9997dab into elastic:main Dec 4, 2024
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12161424132

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @hop-dev

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 4, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone

(cherry picked from commit 9997dab)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 4, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone

(cherry picked from commit 9997dab)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.17
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 4, 2024
…engine init API call (#202903) (#202935)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Entity Analytics][Entity Store] Clear error on second entity engine
init API call (#202903)](#202903)

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

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

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"mark.hopkin@elastic.co"},"sourceCommit":{"committedDate":"2024-12-04T14:06:56Z","message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054","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"],"title":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call","number":202903,"url":"https://github.com/elastic/kibana/pull/202903","mergeCommit":{"message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202903","number":202903,"mergeCommit":{"message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054"}},{"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"}]}]
BACKPORT-->

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
kibanamachine added a commit that referenced this pull request Dec 4, 2024
…ngine init API call (#202903) (#202936)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Entity Analytics][Entity Store] Clear error on second entity engine
init API call (#202903)](#202903)

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

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

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"mark.hopkin@elastic.co"},"sourceCommit":{"committedDate":"2024-12-04T14:06:56Z","message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054","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"],"title":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call","number":202903,"url":"https://github.com/elastic/kibana/pull/202903","mergeCommit":{"message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202903","number":202903,"mergeCommit":{"message":"[Entity
Analytics][Entity Store] Clear error on second entity engine init API
call (#202903)\n\n## Summary\n\nIf the first call to init an entity
engine fails, we add the `error`\nproperty to the engine status, if we
then call the API a second time\nthis error was not being wiped. This PR
resets the error on the second\ncall.\n\n### Test steps\n\n- Do not
visit the UI of a kibana so that the security default data view\ndoes
not exist\n- Call the init API for an entity engine e,g host\n- Call the
engine status API, notice the status has an error\n- Visait the security
solution UI and wait for the data view to be\ncreated\n- Re-call the
init API and notice the error has
gone","sha":"9997dabf90f3dd36c0577a8d6f6e10dd5dc88054"}},{"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"}]}]
BACKPORT-->

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone
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 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants