-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Elasticsearch] remove legacy es client #107619
[Elasticsearch] remove legacy es client #107619
Conversation
@mistic The integration test failures likely are caused by my changes, but it's hard to debug them due to cryptic error stack:
Would you mind taking a look, please? |
Sounds like a good plan to me. |
@elasticmachine merge upstream |
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.
We can remove this now as the fix on Bazel was introduced
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
…ient' into issue-83910-remove-legacy-es-client
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport'; | ||
import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; | ||
import { ElasticsearchClient } from './types'; | ||
import { ICustomClusterClient } from './cluster_client'; | ||
import { PRODUCT_RESPONSE_HEADER } from '../supported_server_response_check'; | ||
|
||
// use jest.requireActual() to prevent weird errors when people mock @elastic/elasticsearch | ||
const { Client: UnmockedClient } = jest.requireActual('@elastic/elasticsearch'); |
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.
@@ -53,7 +52,7 @@ describe('geo_containment', () => { | |||
it('should correctly transform expected results', async () => { | |||
const transformedResults = transformResults( | |||
// @ts-ignore | |||
(sampleAggsJsonResponse.body as unknown) as SearchResponse<unknown>, | |||
sampleAggsJsonResponse.body, |
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.
the line has // @ts-ignore
directive, so the manual casting is unnecessary. and it's wrong anyway.
Pinging @elastic/kibana-core (Team:Core) |
@elastic/kibana-app-services this file contains references to |
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.
🥇
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.
🙌
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.
Alerting changes LGTM!
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.
geo_containment changes LGMT
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.
src/plugins/data/server/server.api.md
CO review, LGTM
💚 Build SucceededMetrics [docs]Unknown metric groupsAPI count
API count missing comments
API count with any type
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
* remove legacy es client * update docs * uninstall elasticsearch package * fix global_search tests * ad-hoc fix to address bazel failure. authored by Tiago * update docs * remove elasticsearch import. errors are muted with @ts-ignore * Update WORKSPACE.bazel Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> * update docs * fix problem when dev mock already mocked client Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> # Conflicts: # src/core/server/elasticsearch/legacy/scoped_cluster_client.test.ts
* remove legacy es client * update docs * uninstall elasticsearch package * fix global_search tests * ad-hoc fix to address bazel failure. authored by Tiago * update docs * remove elasticsearch import. errors are muted with @ts-ignore * Update WORKSPACE.bazel Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> * update docs * fix problem when dev mock already mocked client Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> # Conflicts: # src/core/server/elasticsearch/legacy/scoped_cluster_client.test.ts
Summary
closes #106885
closes #108388
Remove the legacy ES client from Core API and the legacy
elasticsearch
client from Kibana dependencies.It's been deprecated for a long time and we stated that it will be removed by
v7.16.0
kibana/src/core/server/elasticsearch/types.ts
Line 76 in ca137ea
Plugin API changes
The legacy Elasticsearch client is no longer available in
CoreSetup
andRequestHandlerContext
interfaces. Use the new client instead https://www.elastic.co/guide/en/kibana/current/elasticsearch-service.html