-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][Detections] Cleanup usages of old bulk rule CRUD endpoints #126068
Conversation
4896bfd
to
6ace2de
Compare
9500867
to
26081a6
Compare
7eaf46e
to
ac964fd
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
da3ef3e
to
0f1ac6e
Compare
1ea64d9
to
ba3696a
Compare
expect.anything(), | ||
expect.anything() | ||
expect(executeRulesBulkAction).toHaveBeenCalledWith( | ||
expect.objectContaining({ action: 'duplicate', search: { ids: ['id'] } }) | ||
); | ||
}); | ||
}); | ||
|
||
test('it calls editRuleAction after the rule is duplicated', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: Test titles still using editRuleAction
/duplicateRulesAction
which are no longer the functions being called here. Tests still read fine/make sense to me, so no change necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I missed that, will rename it in one of my following PRs
x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out, desk tested locally, and code reviewed -- LGTM! 👍 Thank you so much for all the cleanup here @xcrzx! 🙂 It's soooo much easier to follow the code around these actions now, and makes these actions even easier to consume as well. Just a couple small nits around copy but everything else looks good to me and tested without issue! 🚀
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
6d2fa2b
to
0c850a8
Compare
💛 Build succeeded, but was flakyTest FailuresMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @xcrzx |
@elasticmachine merge upstream |
Related to: #125574
Summary
enableRulesAction
,duplicateRulesAction
, etc) with the genericexecuteRulesBulkAction
.Unused bulk CRUD endpoints
After the cleanup, some API endpoints are not used anymore. We can deprecate them:
${DETECTION_ENGINE_RULES_URL}/_bulk_update
${DETECTION_ENGINE_RULES_URL}/_bulk_delete
${DETECTION_ENGINE_RULES_URL}/_bulk_create