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

[SecuritySolution] Improve asset criticality bulk error when entities are duplicated #199651

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented Nov 11, 2024

Summary

  • Improve asset criticality bulk error when entities are duplicated
  • It also fixes the server errors line to be '1' based.

Screenshot 2024-11-11 at 11 46 31

Performance

Test parameters: file with +33k lines and ~1 MB size.

  • Before 6.24 seconds
  • After 6.46 seconds

Execution time Increased ~0.22 seconds

Checklist

Delete any items that are not applicable to this PR.

It also fixes server errors line to be '1' based.
@machadoum machadoum self-assigned this Nov 11, 2024
@machadoum machadoum added v9.0.0 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: entity_analytics Feature:Entity Analytics Security Solution Entity Analytics features Team:Entity Analytics Security Entity Analytics Team backport:version Backport to applied version labels v8.17.0 release_note:enhancement bug Fixes for quality problems that affect the customer experience release_note:fix and removed release_note:enhancement labels Nov 11, 2024
@machadoum machadoum marked this pull request as ready for review November 11, 2024 14:19
@machadoum machadoum requested a review from a team as a code owner November 11, 2024 14:19
@machadoum machadoum requested a review from hop-dev November 11, 2024 14:19
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@hop-dev
Copy link
Contributor

hop-dev commented Nov 11, 2024

@machadoum could you compare the time taken uploading a very big file before and after the duplication detection change?

Copy link
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

I have left a comment about the effects on bulk JSON upload, and about doing a performance test 🙇

Copy link
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

😎

@machadoum machadoum enabled auto-merge (squash) November 12, 2024 14:48
@machadoum machadoum merged commit 02ac5fc into elastic:main Nov 13, 2024
45 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @machadoum

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
… are duplicated (elastic#199651)

## Summary

* Improve asset criticality bulk error when entities are duplicated
* It also fixes the server errors line to be '1' based.

![Screenshot 2024-11-11 at 11 46
31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)

### Performance

Test parameters: file with +33k lines and ~1 MB size.
* Before 6.24 seconds
* After 6.46 seconds

Execution time Increased  ~0.22 seconds

### Checklist

Delete any items that are not applicable to this PR.

- [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

(cherry picked from commit 02ac5fc)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@machadoum
Copy link
Member 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

machadoum added a commit to machadoum/kibana that referenced this pull request Nov 13, 2024
… are duplicated (elastic#199651)

## Summary

* Improve asset criticality bulk error when entities are duplicated
* It also fixes the server errors line to be '1' based.

![Screenshot 2024-11-11 at 11 46
31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)

### Performance

Test parameters: file with +33k lines and ~1 MB size.
* Before 6.24 seconds
* After 6.46 seconds

Execution time Increased  ~0.22 seconds

### Checklist

Delete any items that are not applicable to this PR.

- [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

(cherry picked from commit 02ac5fc)
kibanamachine added a commit that referenced this pull request Nov 13, 2024
…tities are duplicated (#199651) (#199968)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[SecuritySolution] Improve asset criticality bulk error when entities
are duplicated (#199651)](#199651)

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

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

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T10:22:44Z","message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","Team:
SecuritySolution","Theme: entity_analytics","Feature:Entity
Analytics","Team:Entity
Analytics","backport:version","v8.17.0"],"title":"[SecuritySolution]
Improve asset criticality bulk error when entities are
duplicated","number":199651,"url":"https://github.com/elastic/kibana/pull/199651","mergeCommit":{"message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199651","number":199651,"mergeCommit":{"message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Pablo Machado <[email protected]>
machadoum added a commit that referenced this pull request Nov 13, 2024
…ntities are duplicated (#199651) (#199971)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[SecuritySolution] Improve asset criticality bulk error when entities
are duplicated (#199651)](#199651)

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

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

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T10:22:44Z","message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","Team:
SecuritySolution","Theme: entity_analytics","Feature:Entity
Analytics","Team:Entity
Analytics","backport:version","v8.17.0","v8.16.1"],"number":199651,"url":"https://github.com/elastic/kibana/pull/199651","mergeCommit":{"message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199651","number":199651,"mergeCommit":{"message":"[SecuritySolution]
Improve asset criticality bulk error when entities are duplicated
(#199651)\n\n## Summary\r\n\r\n* Improve asset criticality bulk error
when entities are duplicated\r\n* It also fixes the server errors line
to be '1' based.\r\n\r\n![Screenshot 2024-11-11 at 11
46\r\n31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)\r\n\r\n###
Performance\r\n\r\nTest parameters: file with +33k lines and ~1 MB
size.\r\n* Before 6.24 seconds\r\n* After 6.46 seconds\r\n\r\nExecution
time Increased ~0.22 seconds\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\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","sha":"02ac5fc90f08615d877befc05f9675838ade77b4"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/199968","number":199968,"state":"OPEN"},{"branch":"8.16","label":"v8.16.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
… are duplicated (elastic#199651)

## Summary

* Improve asset criticality bulk error when entities are duplicated
* It also fixes the server errors line to be '1' based.

![Screenshot 2024-11-11 at 11 46
31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)

### Performance

Test parameters: file with +33k lines and ~1 MB size.
* Before 6.24 seconds
* After 6.46 seconds

Execution time Increased  ~0.22 seconds


### Checklist

Delete any items that are not applicable to this PR.

- [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
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
… are duplicated (elastic#199651)

## Summary

* Improve asset criticality bulk error when entities are duplicated
* It also fixes the server errors line to be '1' based.

![Screenshot 2024-11-11 at 11 46
31](https://github.com/user-attachments/assets/3fbf35fb-cd27-417a-bf53-41a197d1bbe9)

### Performance

Test parameters: file with +33k lines and ~1 MB size.
* Before 6.24 seconds
* After 6.46 seconds

Execution time Increased  ~0.22 seconds


### Checklist

Delete any items that are not applicable to this PR.

- [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
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 bug Fixes for quality problems that affect the customer experience Feature:Entity Analytics Security Solution Entity Analytics features release_note:fix Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: entity_analytics v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants