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

Upgrade ES client to 9.0.0-alpha.4 #213375

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

afharo
Copy link
Member

@afharo afharo commented Mar 6, 2025

Summary

Upgrading the ES client to v9.0.0-alpha.4 to test the changes mentioned in elastic/elasticsearch-js#2584

This new version introduces some type changes, most notably, the FieldValue is string | number | boolean | null | undefined instead of any, leading to some new type checks to be implemented (like on aggregation results bucket.key, search_after, and sort options).

On top of that, it adds the new behavior where unknown properties are placed in the body (when the request has a body). If they must be in as a query parameter, they should be placed under the querystring option.

cc @JoshMock

TODO:

  • Stabilize the type errors
  • Address all the query parameters that are now placed in the body (by wrapping them inside the option querystring: {})
  • Try to address // @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584 (potentially in a separate PR to reduce noise)

Related #208776

Sorry, something went wrong.

@afharo afharo self-assigned this Mar 6, 2025
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 6, 2025

🤖 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!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@afharo afharo added Feature:elasticsearch Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting elasticsearch-js-9 Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:Fleet Team label for Observability Data Collection Fleet team Team:Detections and Resp Security Detection Response Team Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:obs-ux-logs Observability Logs User Experience Team Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Detection Rule Management Security Detection Rule Management Team Team:Cloud Security Cloud Security team related Team:Detection Engine Security Solution Detection Engine Area Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team Team:Security Generative AI Security Generative AI Team:AI Infra AppEx AI Infrastructure Team Feature:Streams This is the label for the Streams Project labels Mar 6, 2025
@afharo afharo force-pushed the es-9.0.0-alpha.4 branch from c2a6ef3 to 6cadeaa Compare March 6, 2025 22:02
@@ -194,8 +194,7 @@ export const executeUpdate = async <T>(
refresh,
document: rawUpsert._source,
...(version ? decodeRequestVersion(version) : {}),
// @ts-expect-error
require_alias: true,
querystring: { require_alias: true },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshMock, here's a missing query parameter in the spec.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I opened elastic/elasticsearch-specification#3954 to add it (plus a bunch of others that were also missing).

@@ -159,7 +159,7 @@ export const performCreate = async <T>(
refresh,
document: raw._source,
...(overwrite && version ? decodeRequestVersion(version) : {}),
require_alias: true,
querystring: { require_alias: true },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require_alias is accepted by the IndexRequest but not the CreateRequest, so I went with the querystring passthrough for both here.

@afharo afharo force-pushed the es-9.0.0-alpha.4 branch from 23551ff to 81978d7 Compare March 10, 2025 10:25
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 10, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #121 / @ess @serverless @serverlessQA SecuritySolution Timeline Timeline @skipInServerless resolve timeline "before all" hook for "should return outcome exactMatch when the id is unchanged"
  • [job] [logs] Jest Tests #12 / Cloud Experiments server plugin start triggers a userMetadataUpdate for hasData
  • [job] [logs] Jest Tests #12 / Cloud Experiments server plugin start triggers a userMetadataUpdate for hasData
  • [job] [logs] Jest Tests #9 / healthRoute logs at a warn level if the status is warning
  • [job] [logs] Jest Tests #9 / healthRoute logs at a warn level if the status is warning
  • [job] [logs] Jest Tests #9 / healthRoute returns a error status if the workload stats have not been updated within the required cold freshness
  • [job] [logs] Jest Tests #9 / healthRoute returns a error status if the workload stats have not been updated within the required cold freshness
  • [job] [logs] Jest Tests #5 / passes browserTimezone to getScreenshots
  • [job] [logs] Jest Tests #19 / passes browserTimezone to getScreenshots
  • [job] [logs] Jest Tests #19 / passes browserTimezone to getScreenshots
  • [job] [logs] Jest Tests #5 / passes browserTimezone to getScreenshots
  • [job] [logs] Jest Tests #9 / registerTaskManagerUsageCollector should report telemetry on the excluded task types
  • [job] [logs] Jest Tests #5 / returns buffer content base64 encoded
  • [job] [logs] Jest Tests #19 / returns buffer content base64 encoded
  • [job] [logs] Jest Tests #19 / returns buffer content base64 encoded
  • [job] [logs] Jest Tests #5 / returns buffer content base64 encoded
  • [job] [logs] Jest Tests #5 / returns content_type of application/pdf
  • [job] [logs] Jest Tests #5 / returns content_type of application/pdf
  • [job] [logs] Jest Tests #19 / returns content_type of application/png
  • [job] [logs] Jest Tests #19 / returns content_type of application/png
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() #createInternalRepository creates a repository including hidden types when specified
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() #createScopedRepository creates a repository including hidden types when specified
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() #createScopedRepository creates a repository scoped to the user
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() index retrieval APIs #getIndexForType return the correct index for type specifying its indexPattern
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() index retrieval APIs #getIndicesForTypes return the correct indices for specified types
  • [job] [logs] Jest Tests #4 / SavedObjectsService #start() returns the information about the time spent migrating
  • [job] [logs] Jest Tests #5 / screenshotting plugin uses the logger provided by the PDF export-type
  • [job] [logs] Jest Tests #5 / screenshotting plugin uses the logger provided by the PDF export-type
  • [job] [logs] Jest Tests #19 / screenshotting plugin uses the logger provided by the PNG export-type
  • [job] [logs] Jest Tests #19 / screenshotting plugin uses the logger provided by the PNG export-type
  • [job] [logs] Jest Tests #2 / write_list_items_to_stream exportListItemsToStream It exports single list item to the stream
  • [job] [logs] Jest Tests #2 / write_list_items_to_stream exportListItemsToStream It exports single list item to the stream

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
security 521.8KB 521.8KB +5.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
data 55 56 +1

Total ESLint disabled count

id before after diff
data 56 57 +1

History

cc @afharo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting elasticsearch-js-9 Feature:elasticsearch Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes Team:AI Infra AppEx AI Infrastructure Team Team:Cloud Security Cloud Security team related Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Detection Engine Security Solution Detection Engine Area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team:Fleet Team label for Observability Data Collection Fleet team Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-logs Observability Logs User Experience Team Team:obs-ux-management Observability Management User Experience Team Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Security Generative AI Security Generative AI Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants