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] Show errors on entity store enablement #198263

Merged
merged 8 commits into from
Oct 31, 2024

Conversation

tiansivive
Copy link
Contributor

@tiansivive tiansivive commented Oct 30, 2024

Summary

This PR adds user feedback for errors that happen when enabling the entity store.
Any errors during the async setup of store resources will show up as toasts, whist initial INIT request failures will appear as an error callout.

Screenshot 2024-10-29 at 16 48 03
Screenshot 2024-10-29 at 16 47 19

@tiansivive tiansivive added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Theme: entity_analytics Team:Entity Analytics Security Entity Analytics Team v8.16.0 backport:version Backport to applied version labels labels Oct 30, 2024
@tiansivive tiansivive requested a review from a team as a code owner October 30, 2024 09:05
@elasticmachine
Copy link
Contributor

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

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner October 30, 2024 09:39
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Hey @tiansivive ! Overall looks good. Focussed review on SO parts and left some qs.

},
{
type: 'data_backfill',
backfillFn: (document) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are adding a new default field to the schema that is optional we don't need to run this backfill operation, leaving it undefined should be fine. Or does null mean something specific in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, it was meant to clearly state there was no value as its optional. I wasn't sure whether just leaving it undefined would work. I'll update

Comment on lines 33 to 35
error: {
type: 'object',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we searching over this value? If not then we don't need to include it in mappings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so I dont need to add a migration for it? I can just "silently" add it to the saved object?

Copy link
Contributor Author

@tiansivive tiansivive Oct 30, 2024

Choose a reason for hiding this comment

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

I ended up removing the migration, seems like that is the correct way to do this since we never want to search on errors. Please do let me know if there are other concerns wrt the SO @jloleysens

@tiansivive tiansivive force-pushed the ea-entity-store-10900 branch from b5a88c1 to 29b6fea Compare October 30, 2024 21:11
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #78 / GenAI - Knowledge Base Entries APIs @ess Basic Security AI Assistant Knowledge Base Entries "before all" hook in "@ess Basic Security AI Assistant Knowledge Base Entries"

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.0MB 21.0MB +1.4KB

History

@jaredburgettelastic jaredburgettelastic merged commit 4538481 into elastic:main Oct 31, 2024
44 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 31, 2024
…ent (elastic#198263)

## Summary

This PR adds user feedback for errors that happen when enabling the
entity store.
Any errors during the async setup of store resources will show up as
toasts, whist initial INIT request failures will appear as an error
callout.

![Screenshot 2024-10-29 at 16 48
03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)
![Screenshot 2024-10-29 at 16 47
19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 4538481)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16
8.x Backport failed because of merge conflicts

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 198263

Questions ?

Please refer to the Backport tool documentation

tiansivive added a commit to tiansivive/kibana that referenced this pull request Oct 31, 2024
…ent (elastic#198263)

## Summary

This PR adds user feedback for errors that happen when enabling the
entity store.
Any errors during the async setup of store resources will show up as
toasts, whist initial INIT request failures will appear as an error
callout.

![Screenshot 2024-10-29 at 16 48
03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)
![Screenshot 2024-10-29 at 16 47
19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)

---------

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

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
tiansivive added a commit to tiansivive/kibana that referenced this pull request Oct 31, 2024
…ent (elastic#198263)

## Summary

This PR adds user feedback for errors that happen when enabling the
entity store.
Any errors during the async setup of store resources will show up as
toasts, whist initial INIT request failures will appear as an error
callout.

![Screenshot 2024-10-29 at 16 48
03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)
![Screenshot 2024-10-29 at 16 47
19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)

---------

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

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
tiansivive added a commit that referenced this pull request Oct 31, 2024
…nablement (#198263) (#198474)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Entity Analytics] [Entity Store] Show errors on entity store
enablement (#198263) (4538481)

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

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

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-31T03:44:43Z","message":"[Entity
Analytics] [Entity Store] Show errors on entity store enablement
(#198263)\n\n## Summary\r\n\r\nThis PR adds user feedback for errors
that happen when enabling the\r\nentity store.\r\nAny errors during the
async setup of store resources will show up as\r\ntoasts, whist initial
INIT request failures will appear as an
error\r\ncallout.\r\n\r\n![Screenshot 2024-10-29 at 16
48\r\n03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)\r\n![Screenshot
2024-10-29 at 16
47\r\n19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"4538481be0c7f519fe716cca611b2ebfa5f89351"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->
kibanamachine added a commit that referenced this pull request Oct 31, 2024
…enablement (#198263) (#198462)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Entity Analytics] [Entity Store] Show errors on entity store
enablement (#198263)](#198263)

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

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

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-31T03:44:43Z","message":"[Entity
Analytics] [Entity Store] Show errors on entity store enablement
(#198263)\n\n## Summary\r\n\r\nThis PR adds user feedback for errors
that happen when enabling the\r\nentity store.\r\nAny errors during the
async setup of store resources will show up as\r\ntoasts, whist initial
INIT request failures will appear as an
error\r\ncallout.\r\n\r\n![Screenshot 2024-10-29 at 16
48\r\n03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)\r\n![Screenshot
2024-10-29 at 16
47\r\n19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"4538481be0c7f519fe716cca611b2ebfa5f89351","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Theme:
entity_analytics","Team:Entity
Analytics","v8.16.0","backport:version","v8.17.0"],"title":"[Entity
Analytics] [Entity Store] Show errors on entity store
enablement","number":198263,"url":"https://github.com/elastic/kibana/pull/198263","mergeCommit":{"message":"[Entity
Analytics] [Entity Store] Show errors on entity store enablement
(#198263)\n\n## Summary\r\n\r\nThis PR adds user feedback for errors
that happen when enabling the\r\nentity store.\r\nAny errors during the
async setup of store resources will show up as\r\ntoasts, whist initial
INIT request failures will appear as an
error\r\ncallout.\r\n\r\n![Screenshot 2024-10-29 at 16
48\r\n03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)\r\n![Screenshot
2024-10-29 at 16
47\r\n19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"4538481be0c7f519fe716cca611b2ebfa5f89351"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198263","number":198263,"mergeCommit":{"message":"[Entity
Analytics] [Entity Store] Show errors on entity store enablement
(#198263)\n\n## Summary\r\n\r\nThis PR adds user feedback for errors
that happen when enabling the\r\nentity store.\r\nAny errors during the
async setup of store resources will show up as\r\ntoasts, whist initial
INIT request failures will appear as an
error\r\ncallout.\r\n\r\n![Screenshot 2024-10-29 at 16
48\r\n03](https://github.com/user-attachments/assets/12aa9af3-1e27-44b1-85e5-5053255bd333)\r\n![Screenshot
2024-10-29 at 16
47\r\n19](https://github.com/user-attachments/assets/31790981-599b-4fba-a423-b75e31dbe7be)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"4538481be0c7f519fe716cca611b2ebfa5f89351"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Tiago Vila Verde <[email protected]>
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:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team Theme: entity_analytics v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants