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

Support ES client version upgrade to v8.0 #108387

Closed
mshustov opened this issue Aug 12, 2021 · 1 comment · Fixed by #113950
Closed

Support ES client version upgrade to v8.0 #108387

mshustov opened this issue Aug 12, 2021 · 1 comment · Fixed by #113950
Assignees
Labels
Feature:elasticsearch Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0

Comments

@mshustov
Copy link
Contributor

mshustov commented Aug 12, 2021

You can find the full Elasticsearch client roadmap here elastic/elasticsearch-js#1542
There are a few things that may require additional work from the Core side:

  • Remove the body key from the request. effort for Core: Small, providing the client gives a long migration period for the legacy style, otherwise it affects nearly all the usages in Kibana codebase.
  • The returned value of API calls is the body and not the HTTP related keys. effort for Core: Small, providing client allows Kibana to specify { meta: true } on the client level and ships kibana.d.ts with ApiResponse-comptible typings.
    @elastic/elasticsearch client continue shipping a Kibana-specific d.ts to support 7.x-compatible interfaces by default. After 8.0 we can consider an option to allow plugins to specify meta:false to return body as response.
  • Migrate to the "undici" http client. We need to investigate what incompatibilities Kibana might have with the configuration parameters of the new http agent. The ES client supports configuring what http client should be used. To be on the safe side, we can continue using the native http agent. Migration to the undici agent can be done in a follow-up PR.
    export type ElasticsearchClientConfig = Pick<
    ElasticsearchConfig,
    | 'customHeaders'
    | 'sniffOnStart'
    | 'sniffOnConnectionFault'
    | 'requestHeadersWhitelist'
    | 'sniffInterval'
    | 'hosts'
    | 'username'
    | 'password'
    | 'serviceAccountToken'
    > & {
    pingTimeout?: ElasticsearchConfig['pingTimeout'] | ClientOptions['pingTimeout'];
    requestTimeout?: ElasticsearchConfig['requestTimeout'] | ClientOptions['requestTimeout'];
    ssl?: Partial<ElasticsearchConfig['ssl']>;
    keepAlive?: boolean;
    };
  • Rename ssl option to tls effort for Core: Small, we aren't going to rename elasticsearch.ssl config, just handle the renaming internally.
  • Move from emitter-like interface to a diagnostic method effort for Core: Small
@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 labels Aug 12, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:elasticsearch Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants