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] Integrate state and components for Prebuilt Rule Update Workflow #193531

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Sep 20, 2024

Epic: #174168
Addresses: #171520

Summary

This PR introduces a new Update tab allowing users to resolve rule upgrade conflicts. It's a result of combination of read-only components implemented in #193261 and rule upgrade state implemented in #191721.

Details

The goal of this PR is to provide intermediate integration between rule upgrade state (PR) and components displaying the diff and read-only state (PR). It will facilitate further development of rule field editable components and streamline rule upgrade functionality developing.

How to test?

The functionality is hidden under prebuiltRulesCustomizationEnabled feature flag. Add the following to your Kibana config

xpack.securitySolution.enableExperimental:
  - prebuiltRulesCustomizationEnabled

When the above feature flag enabled the new Update tab is displayed instead of the old one.

Screenshots

Suggested components design
image

New Update tab
image

@maximpn maximpn added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Sep 20, 2024
@maximpn maximpn self-assigned this Sep 20, 2024
@maximpn maximpn force-pushed the integrate-prebuilt-rule-upgrade-state-and-components branch from 8bbe0f2 to c3baafb Compare September 26, 2024 07:56
@maximpn maximpn marked this pull request as ready for review September 26, 2024 10:57
@maximpn maximpn requested review from a team as code owners September 26, 2024 10:57
@maximpn maximpn requested a review from xcrzx September 26, 2024 10:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@maximpn maximpn requested review from nikitaindik and removed request for xcrzx September 26, 2024 10:57
{fieldDiffs.map(({ currentVersion, targetVersion, fieldName: specificFieldName }, index) => {
const shouldShowSeparator = index !== fieldDiffs.length - 1;
const isLast = index !== fieldDiffs.length - 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const isLast = index !== fieldDiffs.length - 1;
const isLast = index === fieldDiffs.length - 1;

I think it should be ===, otherwise it shows a separator only after the last item.

Copy link
Contributor

@nikitaindik nikitaindik left a comment

Choose a reason for hiding this comment

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

Thanks @maximpn! Left one comment about the current "Updates" tab, but overall LGTM. Feel free to merge once you fix the issue I mentioned.

@maximpn maximpn enabled auto-merge (squash) September 27, 2024 19:40
@maximpn maximpn merged commit 878ba13 into elastic:main Sep 27, 2024
40 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5843 5931 +88

Async chunks

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

id before after diff
securitySolution 20.5MB 20.5MB +37.5KB

History

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

cc @maximpn

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 27, 2024
…Update Workflow (elastic#193531)

**Epic:** elastic#174168
**Addresses:** elastic#171520

## Summary

This PR introduces a new `Update` tab allowing users to resolve rule upgrade conflicts. It's a result of combination of read-only components implemented in elastic#193261 and rule upgrade state implemented in elastic#191721.

## Details

The goal of this PR is to provide intermediate integration between rule upgrade state ([PR](elastic#191721)) and components displaying the diff and read-only state ([PR](elastic#193261)). It will facilitate further development of rule field editable components and streamline rule upgrade functionality developing.

## How to test?

The functionality is hidden under `prebuiltRulesCustomizationEnabled` feature flag. Add the following to your Kibana config

```yaml
xpack.securitySolution.enableExperimental:
  - prebuiltRulesCustomizationEnabled
```

When the above feature flag enabled the new `Update` tab is displayed instead of the old one.

## Screenshots

Suggested components design
![image](https://github.com/user-attachments/assets/b5aaf571-286a-4595-9bd4-fdaf9a423b03)

New `Update` tab
<img width="1718" alt="image" src="https://github.com/user-attachments/assets/28aa6bb3-f805-4109-a808-d67e58c7c5b8">

(cherry picked from commit 878ba13)
@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

kibanamachine added a commit that referenced this pull request Sep 27, 2024
… Rule Update Workflow (#193531) (#194348)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Integrate state and components for Prebuilt Rule
Update Workflow
(#193531)](#193531)

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

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

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2024-09-27T21:07:12Z","message":"[Security
Solution] Integrate state and components for Prebuilt Rule Update
Workflow (#193531)\n\n**Epic:**
https://github.com/elastic/kibana/issues/174168\r\n**Addresses:**
https://github.com/elastic/kibana/issues/171520\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new `Update` tab allowing users to
resolve rule upgrade conflicts. It's a result of combination of
read-only components implemented in
#193261 and rule upgrade state
implemented in https://github.com/elastic/kibana/pull/191721.\r\n\r\n##
Details\r\n\r\nThe goal of this PR is to provide intermediate
integration between rule upgrade state
([PR](#191721)) and components
displaying the diff and read-only state
([PR](#193261)). It will
facilitate further development of rule field editable components and
streamline rule upgrade functionality developing.\r\n\r\n## How to
test?\r\n\r\nThe functionality is hidden under
`prebuiltRulesCustomizationEnabled` feature flag. Add the following to
your Kibana
config\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n
- prebuiltRulesCustomizationEnabled\r\n```\r\n\r\nWhen the above feature
flag enabled the new `Update` tab is displayed instead of the old
one.\r\n\r\n## Screenshots\r\n\r\nSuggested components design
\r\n![image](https://github.com/user-attachments/assets/b5aaf571-286a-4595-9bd4-fdaf9a423b03)\r\n\r\nNew
`Update` tab\r\n<img width=\"1718\" alt=\"image\"
src=\"https://github.com/user-attachments/assets/28aa6bb3-f805-4109-a808-d67e58c7c5b8\">","sha":"878ba134e96245b038a9765148ad48a36bb2aa4b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","backport:prev-minor"],"title":"[Security Solution]
Integrate state and components for Prebuilt Rule Update
Workflow","number":193531,"url":"https://github.com/elastic/kibana/pull/193531","mergeCommit":{"message":"[Security
Solution] Integrate state and components for Prebuilt Rule Update
Workflow (#193531)\n\n**Epic:**
https://github.com/elastic/kibana/issues/174168\r\n**Addresses:**
https://github.com/elastic/kibana/issues/171520\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new `Update` tab allowing users to
resolve rule upgrade conflicts. It's a result of combination of
read-only components implemented in
#193261 and rule upgrade state
implemented in https://github.com/elastic/kibana/pull/191721.\r\n\r\n##
Details\r\n\r\nThe goal of this PR is to provide intermediate
integration between rule upgrade state
([PR](#191721)) and components
displaying the diff and read-only state
([PR](#193261)). It will
facilitate further development of rule field editable components and
streamline rule upgrade functionality developing.\r\n\r\n## How to
test?\r\n\r\nThe functionality is hidden under
`prebuiltRulesCustomizationEnabled` feature flag. Add the following to
your Kibana
config\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n
- prebuiltRulesCustomizationEnabled\r\n```\r\n\r\nWhen the above feature
flag enabled the new `Update` tab is displayed instead of the old
one.\r\n\r\n## Screenshots\r\n\r\nSuggested components design
\r\n![image](https://github.com/user-attachments/assets/b5aaf571-286a-4595-9bd4-fdaf9a423b03)\r\n\r\nNew
`Update` tab\r\n<img width=\"1718\" alt=\"image\"
src=\"https://github.com/user-attachments/assets/28aa6bb3-f805-4109-a808-d67e58c7c5b8\">","sha":"878ba134e96245b038a9765148ad48a36bb2aa4b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193531","number":193531,"mergeCommit":{"message":"[Security
Solution] Integrate state and components for Prebuilt Rule Update
Workflow (#193531)\n\n**Epic:**
https://github.com/elastic/kibana/issues/174168\r\n**Addresses:**
https://github.com/elastic/kibana/issues/171520\r\n\r\n##
Summary\r\n\r\nThis PR introduces a new `Update` tab allowing users to
resolve rule upgrade conflicts. It's a result of combination of
read-only components implemented in
#193261 and rule upgrade state
implemented in https://github.com/elastic/kibana/pull/191721.\r\n\r\n##
Details\r\n\r\nThe goal of this PR is to provide intermediate
integration between rule upgrade state
([PR](#191721)) and components
displaying the diff and read-only state
([PR](#193261)). It will
facilitate further development of rule field editable components and
streamline rule upgrade functionality developing.\r\n\r\n## How to
test?\r\n\r\nThe functionality is hidden under
`prebuiltRulesCustomizationEnabled` feature flag. Add the following to
your Kibana
config\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n
- prebuiltRulesCustomizationEnabled\r\n```\r\n\r\nWhen the above feature
flag enabled the new `Update` tab is displayed instead of the old
one.\r\n\r\n## Screenshots\r\n\r\nSuggested components design
\r\n![image](https://github.com/user-attachments/assets/b5aaf571-286a-4595-9bd4-fdaf9a423b03)\r\n\r\nNew
`Update` tab\r\n<img width=\"1718\" alt=\"image\"
src=\"https://github.com/user-attachments/assets/28aa6bb3-f805-4109-a808-d67e58c7c5b8\">","sha":"878ba134e96245b038a9765148ad48a36bb2aa4b"}}]}]
BACKPORT-->

Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
@maximpn maximpn deleted the integrate-prebuilt-rule-upgrade-state-and-components branch September 28, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants