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/observability-ui #204873

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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 (8.x) the previous minor version (i.e. one version back from main) labels Dec 19, 2024
@afharo afharo self-assigned this Dec 19, 2024
@afharo afharo added Team:Observability Team label for Observability Team (for things that are handled across all of observability) Team:obs-ux-management Observability Management User Experience Team labels Jan 21, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 21, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #11 / HoverableAvatar renders the tooltip when hovering
  • [job] [logs] Jest Tests #11 / useGetActionLicense unhappy path

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityShared 93.9KB 93.8KB -7.0B

History

cc @afharo

@afharo afharo marked this pull request as ready for review January 21, 2025 17:30
@afharo afharo requested review from a team as code owners January 21, 2025 17:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/unified-observability (Team:Observability)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team Team:Observability Team label for Observability Team (for things that are handled across all of observability)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants