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

[Security Solution] clean unused types, export components and add many unit tests #217100

Merged
merged 3 commits into from
Apr 4, 2025

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Apr 3, 2025

Summary

This code change was originally part of a bigger PR related to the AI for SOC effort. I decided to split the work for 2 reasons:

  • less files to review, less teams impacted
  • this current PR will easily be backported to 8.x while the AI for SOC is only targeting 9.1

This PR makes only a few small changes:

  • remove unused types
  • export a few components/functions outside of the alerts_table folder to make them reusable within the new AI for SOC alert summary page (see PR linked above)
  • add a lot of unit tests to everything, especially the now exported components/functions

UI remains unchanged:

Screenshot 2025-04-03 at 6 09 57 PM
Screenshot 2025-04-03 at 6 10 06 PM
Screenshot 2025-04-03 at 6 10 13 PM
Screenshot 2025-04-03 at 6 10 21 PM

Checklist

Will unblock https://github.com/elastic/security-team/issues/11973

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Apr 3, 2025
@PhilippeOberti PhilippeOberti marked this pull request as ready for review April 3, 2025 21:36
@PhilippeOberti PhilippeOberti requested review from a team as code owners April 3, 2025 21:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

Copy link
Contributor

@lgestc lgestc left a comment

Choose a reason for hiding this comment

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

thank you for the cleanup 💪

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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 8.9MB 8.9MB -671.0B

History

@PhilippeOberti PhilippeOberti merged commit 837059b into elastic:main Apr 4, 2025
9 checks passed
@PhilippeOberti PhilippeOberti deleted the grouped-alert-table branch April 4, 2025 19:11
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 217100

Questions ?

Please refer to the Backport tool documentation

@PhilippeOberti
Copy link
Contributor Author

💚 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

PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request Apr 4, 2025
…y unit tests (elastic#217100)

## Summary

This code change was originally part of [a bigger
PR](elastic#216744) related to the AI for
SOC effort. I decided to split the work for 2 reasons:
- less files to review, less teams impacted
- this current PR will easily be backported to `8.x` while the AI for
SOC is only targeting `9.1`

This PR makes only a few small changes:
- remove unused types
- export a few components/functions outside of the `alerts_table` folder
to make them reusable within the new AI for SOC alert summary page (see
PR linked above)
- add a lot of unit tests to everything, especially the now exported
components/functions

#### UI remains unchanged:

![Screenshot 2025-04-03 at 6 09
57 PM](https://github.com/user-attachments/assets/3e4135e7-6e2f-4b4f-94e5-0dd72f1710bb)
![Screenshot 2025-04-03 at 6 10
06 PM](https://github.com/user-attachments/assets/382391d6-7ae1-4da4-a76f-495b6db69db3)
![Screenshot 2025-04-03 at 6 10
13 PM](https://github.com/user-attachments/assets/28c5947b-2168-4080-b298-5fea1f3f97c7)
![Screenshot 2025-04-03 at 6 10
21 PM](https://github.com/user-attachments/assets/2dc75fcb-9929-4821-830d-b84fceaf232d)

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [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

Will unblock elastic/security-team#11973

(cherry picked from commit 837059b)

# Conflicts:
#	src/platform/packages/shared/kbn-grouping/src/containers/query/index.test.ts
#	src/platform/packages/shared/kbn-grouping/src/mocks.ts
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:Threat Hunting:Investigations Security Solution Investigations Team v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants