-
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
[RAM] replaces savedObjectClient.bulkUpdate with bulkCreate method in RulesClient.bulkEdit #137593
[RAM] replaces savedObjectClient.bulkUpdate with bulkCreate method in RulesClient.bulkEdit #137593
Conversation
Simple example with _bulk update/index actions on SO(can be run in Kibana dev tools)
|
Pinging @elastic/response-ops (Team:ResponseOps) |
…hub.com/vitaliidm/kibana into security-solution/timeline-to-undefined
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @vitaliidm |
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
… RulesClient.bulkEdit (elastic#137593) ## Summary `savedObjectClient.bulkUpdate` method uses ES _bulk API with `update` action, which doesn’t allow to delete fields from Saved Objects(SO), i.e. overwrite them with undefined https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Instead, in this PR it replaced by `savedObjectClient.bulkCreate` with `overwrite=true`, that allows to remove existing fields by complete overwrite of SOs. It results in _bulk API query `index` action ### Checklist Delete any items that are not applicable to this PR. - [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 ff062ce)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… RulesClient.bulkEdit (#137593) (#137976) ## Summary `savedObjectClient.bulkUpdate` method uses ES _bulk API with `update` action, which doesn’t allow to delete fields from Saved Objects(SO), i.e. overwrite them with undefined https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html Instead, in this PR it replaced by `savedObjectClient.bulkCreate` with `overwrite=true`, that allows to remove existing fields by complete overwrite of SOs. It results in _bulk API query `index` action ### Checklist Delete any items that are not applicable to this PR. - [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 ff062ce) Co-authored-by: Vitalii Dmyterko <[email protected]>
Summary
savedObjectClient.bulkUpdate
method uses ES _bulk API withupdate
action, which doesn’t allow to delete fields from Saved Objects(SO), i.e. overwrite them with undefinedhttps://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
Instead, in this PR it replaced by
savedObjectClient.bulkCreate
withoverwrite=true
, that allows to remove existing fields by complete overwrite of SOs. It results in _bulk API queryindex
actionChecklist
Delete any items that are not applicable to this PR.