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] Add dataViewId to filter actions #177946

Merged
merged 25 commits into from
Mar 6, 2024

Conversation

semd
Copy link
Contributor

@semd semd commented Mar 4, 2024

Summary

This PR fixes a bug related to the filter edition:
#164406

Filter actions were missing the meta.index value, which needs to be assigned to the dataView id being used. When the filter is edited, the filter component retrieves the index pattern from the dataView saved object.

The meta.index value has been added to all the "Filter in/out" actions using the CellActions metadata object.

Thanks @angorayc for catching this and implementing the fix

Screenshots

Before:

before

After:

after

@semd semd added bug Fixes for quality problems that affect the customer experience release_note:fix Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore v8.13.0 v8.12.3 labels Mar 4, 2024
@semd semd self-assigned this Mar 4, 2024
@semd semd marked this pull request as ready for review March 4, 2024 15:45
@semd semd requested review from a team as code owners March 4, 2024 15:45
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore)

@semd
Copy link
Contributor Author

semd commented Mar 4, 2024

@elasticmachine merge upstream

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM for the Threat Hunting Investigations team!

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Code-only review, Data Discovery changes LGTM 👍

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM for assistant change, thanks

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5015 5016 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/cell-actions 42 44 +2

Async chunks

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

id before after diff
cloudSecurityPosture 411.3KB 411.7KB +428.0B
discover 580.4KB 580.8KB +428.0B
kubernetesSecurity 207.9KB 208.1KB +155.0B
securitySolution 13.0MB 13.0MB +3.5KB
timelines 30.2KB 30.3KB +134.0B
total +4.6KB
Unknown metric groups

API count

id before after diff
@kbn/cell-actions 60 62 +2

References to deprecated APIs

id before after diff
securitySolution 532 531 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd

Copy link
Contributor

@animehart animehart left a comment

Choose a reason for hiding this comment

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

LGTM for kubernetes security

@semd semd merged commit 406b24c into elastic:main Mar 6, 2024
38 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 6, 2024
## Summary

This PR fixes a bug related to the filter edition:
elastic#164406

Filter actions were missing the `meta.index` value, which needs to be
assigned to the dataView id being used. When the filter is edited, the
filter component retrieves the index pattern from the dataView saved
object.

The `meta.index` value has been added to all the "Filter in/out" actions
using the `CellActions` metadata object.

Thanks @angorayc for catching this and implementing the fix

### Screenshots

Before:

![before](https://github.com/elastic/kibana/assets/17747913/6e60cc1f-7811-4c97-8da0-95b688dd3d96)

After:

![after](https://github.com/elastic/kibana/assets/17747913/abaf740f-6ec0-4263-8455-d9f14dc3e423)

---------

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

💔 Some backports could not be created

Status Branch Result
8.12 Backport failed because of merge conflicts
8.13

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 177946

Questions ?

Please refer to the Backport tool documentation

@semd semd removed the v8.12.3 label Mar 6, 2024
kibanamachine added a commit that referenced this pull request Mar 6, 2024
…#178081)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[Security Solution] Add dataViewId to filter actions
(#177946)](#177946)

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

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

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-06T10:57:41Z","message":"[Security
Solution] Add dataViewId to filter actions (#177946)\n\n##
Summary\r\n\r\nThis PR fixes a bug related to the filter
edition:\r\nhttps://github.com//issues/164406\r\n\r\nFilter
actions were missing the `meta.index` value, which needs to
be\r\nassigned to the dataView id being used. When the filter is edited,
the\r\nfilter component retrieves the index pattern from the dataView
saved\r\nobject.\r\n\r\nThe `meta.index` value has been added to all the
\"Filter in/out\" actions\r\nusing the `CellActions` metadata
object.\r\n\r\nThanks @angorayc for catching this and implementing the
fix\r\n\r\n###
Screenshots\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/6e60cc1f-7811-4c97-8da0-95b688dd3d96)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/abaf740f-6ec0-4263-8455-d9f14dc3e423)\r\n\r\n---------\r\n\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang
<[email protected]>","sha":"406b24c6a8758fc82218ad5dbaf048677454d0d9","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Threat
Hunting","Team:Threat
Hunting:Explore","v8.13.0","v8.14.0","v8.12.3"],"title":"[Security
Solution] Add dataViewId to filter
actions","number":177946,"url":"https://github.com/elastic/kibana/pull/177946","mergeCommit":{"message":"[Security
Solution] Add dataViewId to filter actions (#177946)\n\n##
Summary\r\n\r\nThis PR fixes a bug related to the filter
edition:\r\nhttps://github.com//issues/164406\r\n\r\nFilter
actions were missing the `meta.index` value, which needs to
be\r\nassigned to the dataView id being used. When the filter is edited,
the\r\nfilter component retrieves the index pattern from the dataView
saved\r\nobject.\r\n\r\nThe `meta.index` value has been added to all the
\"Filter in/out\" actions\r\nusing the `CellActions` metadata
object.\r\n\r\nThanks @angorayc for catching this and implementing the
fix\r\n\r\n###
Screenshots\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/6e60cc1f-7811-4c97-8da0-95b688dd3d96)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/abaf740f-6ec0-4263-8455-d9f14dc3e423)\r\n\r\n---------\r\n\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang
<[email protected]>","sha":"406b24c6a8758fc82218ad5dbaf048677454d0d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.13","8.12"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177946","number":177946,"mergeCommit":{"message":"[Security
Solution] Add dataViewId to filter actions (#177946)\n\n##
Summary\r\n\r\nThis PR fixes a bug related to the filter
edition:\r\nhttps://github.com//issues/164406\r\n\r\nFilter
actions were missing the `meta.index` value, which needs to
be\r\nassigned to the dataView id being used. When the filter is edited,
the\r\nfilter component retrieves the index pattern from the dataView
saved\r\nobject.\r\n\r\nThe `meta.index` value has been added to all the
\"Filter in/out\" actions\r\nusing the `CellActions` metadata
object.\r\n\r\nThanks @angorayc for catching this and implementing the
fix\r\n\r\n###
Screenshots\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/6e60cc1f-7811-4c97-8da0-95b688dd3d96)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/abaf740f-6ec0-4263-8455-d9f14dc3e423)\r\n\r\n---------\r\n\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang
<[email protected]>","sha":"406b24c6a8758fc82218ad5dbaf048677454d0d9"}},{"branch":"8.12","label":"v8.12.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Sergi Massaneda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.13.0 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants