-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
base: main
Are you sure you want to change the base?
Conversation
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
@@ -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 }, |
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.
@JoshMock, here's a missing query parameter in the spec.
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, 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 }, |
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.
require_alias
is accepted by the IndexRequest
but not the CreateRequest
, so I went with the querystring
passthrough for both here.
23551ff
to
81978d7
Compare
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @afharo |
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
isstring | number | boolean | null | undefined
instead ofany
, leading to some new type checks to be implemented (like on aggregation resultsbucket.key
,search_after
, andsort
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 thequerystring
option.cc @JoshMock
TODO:
querystring: {}
)// @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