Skip to content

[8.7] [Security Solution] Fix exporting all rules (#152900)#153121

Merged
kibanamachine merged 1 commit intoelastic:8.7from
kibanamachine:backport/8.7/pr-152900
Mar 10, 2023
Merged

[8.7] [Security Solution] Fix exporting all rules (#152900)#153121
kibanamachine merged 1 commit intoelastic:8.7from
kibanamachine:backport/8.7/pr-152900

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.7:

Questions ?

Please refer to the Backport tool documentation

**Relates to:** elastic/security-team#5339, elastic#150097, elastic#150553

## Summary

This PR fixes all rules exporting functionality which started exporting unintentionally runtime fields like `execution_summary`. This way it lead to inability to import just exported rules if as minimum one of them executed just once.

On top of this the PR contains functional and Cypress tests to cover the fix.

## TODO

- [ ] get rid of `await waitForEventLogExecuteComplete()` in functional tests
- [ ] allow `getNewRule()` to rewrite its defaults

### Checklist

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [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 6b62ae2)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Mar 10, 2023
@kibanamachine kibanamachine enabled auto-merge (squash) March 10, 2023 17:28
@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

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 13.9MB 13.9MB +134.0B

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

cc @maximpn

@kibanamachine kibanamachine merged commit 871292e into elastic:8.7 Mar 10, 2023
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