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

[ES body removal] @elastic/security-defend-workflows #204869

Conversation

afharo
Copy link
Member

@afharo afharo commented Dec 19, 2024

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:

const response = await client.search({
  index: 'test',
-  body: {
    query: {
      match_all: {}
    }
-  }
})

For this reason, enabling the "Hide whitespace changes" option when reviewing is recommended.

Some exceptions to this rule:

  • Bulk APIs replace the body array with operations array (direct replacement)
  • Index Put Settings API replace body array with settings (direct replacement)

@afharo afharo added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Dec 19, 2024
@afharo afharo self-assigned this Dec 19, 2024
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 19, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

…-deprecated-body/elastic/security-defend-workflows
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 20, 2025

💔 Build Failed

Failed CI Steps

History

cc @afharo

@afharo
Copy link
Member Author

afharo commented Feb 15, 2025

Closing in favor of #208776

@afharo afharo closed this Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) elasticsearch-js-9 release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants