-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[RAM] 142183 create bulk delete on rules #142466
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
[RAM] 142183 create bulk delete on rules #142466
Conversation
a99497f
to
09e4559
Compare
This reverts commit 64c0621.
…te-bulk-delete-on-rules
@ymao1 Yes, I see now! It's bad. I've tested sending no arguments, but I think I did not have any rules in my account, so I received an error. |
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.
Verified the latest changes and bulk deleting via POSTMAN works as expected. There is still a question of what the task manager bulkRemoveIfExists
should return if some tasks are deleted and some error and we need to handle any potential errors from taskManager.bulkRemoveIfExists
in the rules client so we do not introduce the possibility of Unhandled promise rejections.
@elasticmachine merge upstream |
…r call in try catch
…uskovaue/kibana into RAM-142183-create-bulk-delete-on-rules
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.
LGTM. Thanks for the latest updates! Approving to unblock :)
I left one comment here about not needing to check for ensureRuleTypeEnabled
during bulk delete (we don't check for it during normal delete so I don't think it's needed for bulk delete?)
Also would like to see functional tests for the new task manager functions in x-pack/test/plugin_api_integration/test_suites/task_manager/task_management.ts
but I'm fine with that being done as a followup.
9f32f95
to
8668810
Compare
This reverts commit 7ac339f.
💚 Build Succeeded
Metrics [docs]Public APIs missing exports
History
To update your PR or re-run it, just comment with: cc @guskovaue |
Connected with: #142183
Summary
I am working on getting alive bulk delete for rules.
I this PR I've created a new internal endpoint _bulk_delete.
This endpoint is getting rules ids or filter as parameter and return object like this: { errors: [], total }.
Decide to stick with only backend because PR is already pretty big. But I've tested it from UI as well.
Checklist