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/kibana-data-discovery #204881

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: {}
    }
-  }
})

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!

@afharo afharo added Team:Visualizations Visualization editors, elastic-charts and infrastructure Team:Threat Hunting Security Solution Threat Hunting Team Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting:Explore labels Jan 21, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 22, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #25 / console app console app tabs navigation tabs should be navigable through URL
  • [job] [logs] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #18 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #50 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #67 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #18 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #67 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] FTR Configs #50 / discover Discover CSV Export Generate CSV: new search generates a report from a new search with data: default
  • [job] [logs] Jest Tests #1 / ES search strategy search no sessionId calls the rollup API if the index is a rollup type
  • [job] [logs] Jest Tests #1 / ES search strategy search no sessionId calls the rollup API if the index is a rollup type
  • [job] [logs] FTR Configs #79 / lens app - group 6 lens rollup tests should allow creation of lens xy chart
  • [job] [logs] FTR Configs #79 / lens app - group 6 lens rollup tests should allow creation of lens xy chart
  • [job] [logs] FTR Configs #53 / Reporting API Integration Tests with Security disabled Job Listing APIs Posted CSV job is visible in the job count
  • [job] [logs] FTR Configs #53 / Reporting API Integration Tests with Security disabled Job Listing APIs Posted CSV job is visible in the job count
  • [job] [logs] FTR Configs #17 / Reporting APIs BWC report generation into existing indexes existing 6_2 index single job posted can complete in an index created with an older version
  • [job] [logs] FTR Configs #17 / Reporting APIs BWC report generation into existing indexes existing 6_2 index single job posted can complete in an index created with an older version
  • [job] [logs] FTR Configs #20 / Reporting Functional Tests with Security enabled Security with reporting_user built-in role Discover: Generate CSV does allow user with reporting privileges
  • [job] [logs] FTR Configs #20 / Reporting Functional Tests with Security enabled Security with reporting_user built-in role Discover: Generate CSV does allow user with reporting privileges
  • [job] [logs] FTR Configs #74 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #77 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #80 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #80 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #74 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #77 / Reporting Generate CSV from SearchSource exported CSV file matches snapshot
  • [job] [logs] FTR Configs #20 / search search rollup should return 400 if rollup search is called without index
  • [job] [logs] FTR Configs #20 / search search rollup should return 400 if rollup search is called without index
  • [job] [logs] FTR Configs #103 / Visualize hybrid index pattern should render histogram line chart
  • [job] [logs] FTR Configs #103 / Visualize hybrid index pattern should render histogram line chart

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.3MB 21.3MB -35.0B
threatIntelligence 57.6KB 57.6KB -56.0B
visTypeVega 1.9MB 1.9MB -65.0B
total -156.0B

Page load bundle

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

id before after diff
data 419.5KB 419.5KB -49.0B
unifiedDocViewer 11.3KB 11.2KB -46.0B
total -95.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
data 56 55 -1

Total ESLint disabled count

id before after diff
data 57 56 -1

History

cc @afharo

@rudolf rudolf added elasticsearch-js-9 and removed backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Jan 29, 2025
@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
elasticsearch-js-9 release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Threat Hunting:Explore Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants