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] Simplify bulk action execution #143019

Closed
wants to merge 12 commits into from

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Oct 10, 2022

Summary

Simplify bulk action execution. Simple composable functions allow to easily extend the functionality, simplify unit testing and reduce the overall complexity.

Details

The refactoring follows single responsibility and composability principles. executeRulesBulkAction function is removed in favour of executeRulesBulkAction and performBulkExportAction. A separate performBulkExportAction function allows to highlight it is used in a different way. On top of that in place errors handling localises the functionality which avoid to exposes local functions.

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
  • This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)

@maximpn maximpn self-assigned this Oct 10, 2022
@maximpn maximpn force-pushed the improve-bulk-action-executor branch from a2d5d1a to 1b51e04 Compare October 11, 2022 06:50
@maximpn maximpn added enhancement New value added to drive a business result 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 Feature:Rule Management Security Solution Detection Rule Management labels Oct 11, 2022
@maximpn maximpn linked an issue Oct 11, 2022 that may be closed by this pull request
@maximpn maximpn force-pushed the improve-bulk-action-executor branch from 1808259 to fc207d2 Compare October 11, 2022 10:35
@maximpn maximpn force-pushed the improve-bulk-action-executor branch from 4a4fc7d to d35d0d3 Compare October 11, 2022 14:47
@maximpn maximpn added v8.6.0 impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Oct 11, 2022
@maximpn
Copy link
Contributor Author

maximpn commented Oct 11, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 12, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #2 / Export rules exports only custom rules
  • [job] [logs] Security Solution Tests #2 / Export rules exports only custom rules
  • [job] [logs] Security Solution Tests #2 / Export rules rules with exceptions exports custom rules with exceptions
  • [job] [logs] Security Solution Tests #2 / Export rules rules with exceptions exports custom rules with exceptions

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 6.6MB 6.5MB -6.6KB
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 410 411 +1

Total ESLint disabled count

id before after diff
securitySolution 483 484 +1

History

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

cc @maximpn

@maximpn maximpn closed this Oct 31, 2022
@maximpn
Copy link
Contributor Author

maximpn commented Oct 31, 2022

Closed this PR in favor of #144016.

@maximpn maximpn deleted the improve-bulk-action-executor branch November 8, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Rule Management Security Solution Detection Rule Management impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. 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.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] Improve bulk action executor
3 participants