-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[ES body
removal] @elastic/response-ops
#204882
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
[ES body
removal] @elastic/response-ops
#204882
Conversation
…-deprecated-body/elastic/response-ops
…-deprecated-body/elastic/response-ops
💚 Build Succeeded
Metrics [docs]
History
cc @afharo |
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
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 for this!
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12888756632 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 7bb2dad) # Conflicts: # x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[ES `body` removal] `@elastic/response-ops` (#204882)](#204882) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-21T14:10:54Z","message":"[ES `body` removal] `@elastic/response-ops` (#204882)","sha":"7bb2dad38f8938569374ce5c99d5e4a2f1ff9b95","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","Team:obs-ux-management","Team:Entity Analytics"],"title":"[ES `body` removal] `@elastic/response-ops`","number":204882,"url":"https://github.com/elastic/kibana/pull/204882","mergeCommit":{"message":"[ES `body` removal] `@elastic/response-ops` (#204882)","sha":"7bb2dad38f8938569374ce5c99d5e4a2f1ff9b95"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204882","number":204882,"mergeCommit":{"message":"[ES `body` removal] `@elastic/response-ops` (#204882)","sha":"7bb2dad38f8938569374ce5c99d5e4a2f1ff9b95"}}]}] BACKPORT-->
This reverts commit 7bb2dad.
This reverts commit 7bb2dad. Original PR #204882 caused errors updating alert data stream index mappings in serverless. This seems to be a difference in the Elasticsearch client code handling requests with a body param vs requests without a body param elastic/elasticsearch-js@a4315a9#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439
…elastic#207899) This reverts commit 7bb2dad. Original PR elastic#204882 caused errors updating alert data stream index mappings in serverless. This seems to be a difference in the Elasticsearch client code handling requests with a body param vs requests without a body param elastic/elasticsearch-js@a4315a9#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439 (cherry picked from commit b219962)
…207899) (#208046) # Backport This will backport the following commits from `main` to `8.x`: - [Revert "[ES `body` removal] `@elastic/response-ops` (#204882)" (#207899)](#207899) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-23T04:47:06Z","message":"Revert \"[ES `body` removal] `@elastic/response-ops` (#204882)\" (#207899)\n\nThis reverts commit 7bb2dad.\r\n\r\nOriginal PR #204882 caused errors\r\nupdating alert data stream index mappings in serverless. This seems to\r\nbe a difference in the Elasticsearch client code handling requests with\r\na body param vs requests without a body param\r\nhttps://github.com/elastic/elasticsearch-js/commit/a4315a905e818f1aaed39cd3f72b11c65f343842#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439","sha":"b219962bda1e2183d2d74f3fec2959ebeee52b2e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.18.0"],"title":"Revert \"[ES `body` removal] `@elastic/response-ops` (#204882)\"","number":207899,"url":"https://github.com/elastic/kibana/pull/207899","mergeCommit":{"message":"Revert \"[ES `body` removal] `@elastic/response-ops` (#204882)\" (#207899)\n\nThis reverts commit 7bb2dad.\r\n\r\nOriginal PR #204882 caused errors\r\nupdating alert data stream index mappings in serverless. This seems to\r\nbe a difference in the Elasticsearch client code handling requests with\r\na body param vs requests without a body param\r\nhttps://github.com/elastic/elasticsearch-js/commit/a4315a905e818f1aaed39cd3f72b11c65f343842#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439","sha":"b219962bda1e2183d2d74f3fec2959ebeee52b2e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207899","number":207899,"mergeCommit":{"message":"Revert \"[ES `body` removal] `@elastic/response-ops` (#204882)\" (#207899)\n\nThis reverts commit 7bb2dad.\r\n\r\nOriginal PR #204882 caused errors\r\nupdating alert data stream index mappings in serverless. This seems to\r\nbe a difference in the Elasticsearch client code handling requests with\r\na body param vs requests without a body param\r\nhttps://github.com/elastic/elasticsearch-js/commit/a4315a905e818f1aaed39cd3f72b11c65f343842#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439","sha":"b219962bda1e2183d2d74f3fec2959ebeee52b2e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…elastic#207899) This reverts commit 7bb2dad. Original PR elastic#204882 caused errors updating alert data stream index mappings in serverless. This seems to be a difference in the Elasticsearch client code handling requests with a body param vs requests without a body param elastic/elasticsearch-js@a4315a9#diff-07b3475acb306ea63796d4e5cc559c073a63b84c8deeb9948d9ef24fb04c6439
Summary
in preparation for 9.0, we're trying to remove the deprecated
body
param in the ES client.To make it easier to review, the changes have been split into multiple PRs, trying to group them per code owner as much as possible.
However, unfortunately, due to cross-dependencies, your team may be pinged more than once. Apologies for that additional noise.
What changes?
Nothing changes internally. The ES client already places everything where it should be when performing the request to ES (URL vs. query string vs. body params).
The main change is in the usage: when using the JS ES client, developers don't need to identify what goes in the body and what goes in the URL. All settings are provided at the root level. So, in summary, the change is:
For this reason, enabling the "Hide whitespace changes" option when reviewing is recommended.
Some exceptions to this rule:
body
array withoperations
array (direct replacement)body
array withsettings
(direct replacement)