Skip to content

[8.19] [Security Solution] extract dataView from GroupedAlertsTable (#220681)#222475

Merged
PhilippeOberti merged 1 commit intoelastic:8.19from
PhilippeOberti:backport/8.19/pr-220681
Jun 4, 2025
Merged

[8.19] [Security Solution] extract dataView from GroupedAlertsTable (#220681)#222475
PhilippeOberti merged 1 commit intoelastic:8.19from
PhilippeOberti:backport/8.19/pr-220681

Conversation

@PhilippeOberti
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

@PhilippeOberti PhilippeOberti added the backport This PR is a backport of another PR label Jun 3, 2025
@PhilippeOberti PhilippeOberti enabled auto-merge (squash) June 3, 2025 20:58
@PhilippeOberti PhilippeOberti force-pushed the backport/8.19/pr-220681 branch 2 times, most recently from f34c60e to 061d698 Compare June 3, 2025 21:17
…#220681)

## Summary

Similar to the following previous PRs([this
one](elastic#216572) and [that
one](elastic#219878)), this PR aims at
removing some logic built-in to the `GroupedAlertsTable` and pass the
information via props. It makes this reusable component a lot easier to
use in different scenarios.

In this current case, we're removing the retrieval of the dataView
within the `GroupedAlertsTable`. We now rely on the `DataViewSpec`
object passed via prop instead. This allows us to get rid of the
following props:
- `signalIndexName`, which we now retrieve from the DataViewSpec object
directly
- `runtimeMappings`, which we also now retrieve from the DataViewSpec
object directly

This solves one issue, which was related to the fact that the
`GroupedAlertsTable` was retrieving the `detections` dataView
internally, so there was a high chance that the `signalIndexName` and
`runtimeMappins` passed via props would not match the hardcoded
`detections` dataView retrieved internally... which is very confusing!
We are having this problem in the AI4DSOC Alert summary page, which
creates a adhoc dataView just for alerts...

**_No UI or behavior change are introduced in this PR!_**

Alerts page

https://github.com/user-attachments/assets/a4e0c1a6-fa91-4b1e-881c-56d95667e84b

Rule details page

https://github.com/user-attachments/assets/6d93e7d0-0446-4ecb-aa37-4ab266b62686

AI4DSOC Alert summary page

https://github.com/user-attachments/assets/7354bad2-64d1-4722-94c3-ae2d9b72fcab

### Checklist

- [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 8ca9057)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/data_view_manager/hooks/use_data_view_spec.ts
#	x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx
#	x-pack/solutions/security/plugins/security_solution/public/detections/components/alert_summary/table/table_section.test.tsx
#	x-pack/solutions/security/plugins/security_solution/public/detections/components/alert_summary/table/table_section.tsx
#	x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx
#	x-pack/solutions/security/plugins/security_solution/public/detections/pages/alerts/detection_engine.tsx
#	x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx
@PhilippeOberti PhilippeOberti force-pushed the backport/8.19/pr-220681 branch from 51a15cc to efd070c Compare June 4, 2025 04:53
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #40 / Monitoring app Elasticsearch nodes listing with offline node skipCloud should have a nodes table with correct rows with default sorting

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 9.2MB 9.2MB -107.0B

History

@PhilippeOberti PhilippeOberti merged commit eade0f1 into elastic:8.19 Jun 4, 2025
8 checks passed
@PhilippeOberti PhilippeOberti deleted the backport/8.19/pr-220681 branch June 4, 2025 22:30
delanni added a commit that referenced this pull request Jun 5, 2025
## Summary
There's a type error on 8.19 coming from a backport that didn't apply on
a file. Probably the file wasn't present at the time when the backport
was issued.

As a solution I've copied the state of the file and it's unit test from
main. (cc: @PhilippeOberti )

Original PR: #220681
Backport PR: #222475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants