Skip to content

Commit

Permalink
Add @removeBy tag for legacy ES client types (elastic#99616)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover authored May 11, 2021
1 parent 997e179 commit d97f958
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->.
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->. 7.16
>
Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md)<!-- -->.
> Use [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md)<!-- -->. 7.16
>
Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->.
> Use [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->. 7.16
>
Serves the same purpose as "normal" `ClusterClient` but exposes additional `callAsCurrentUser` method that doesn't use credentials of the Kibana internal user (as `callAsInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
The set of options that defines how API call should be made and result be processed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->.
> Use [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->. 7.16
>
Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## LegacyElasticsearchError interface

@<!-- -->deprecated. The new elasticsearch client doesn't wrap errors anymore.
@<!-- -->deprecated. The new elasticsearch client doesn't wrap errors anymore. 7.16

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [IScopedClusterClient.asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md)<!-- -->.
> Use [IScopedClusterClient.asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md)<!-- -->. 7.16
>
Calls specified `endpoint` with provided `clientParams` on behalf of the user initiated request to the Kibana server (via HTTP request headers). See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [IScopedClusterClient.asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md)<!-- -->.
> Use [IScopedClusterClient.asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md)<!-- -->. 7.16
>
Calls specified `endpoint` with provided `clientParams` on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->.
> Use [scoped cluster client](./kibana-plugin-core-server.iscopedclusterclient.md)<!-- -->. 7.16
>
Serves the same purpose as the normal [cluster client](./kibana-plugin-core-server.iclusterclient.md) but exposes an additional `asCurrentUser` method that doesn't use credentials of the Kibana internal user (as `asInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API instead.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [KibanaRequestRoute](./kibana-plugin-core-server.kibanarequestroute.md) | Request specific route information exposed to a handler. |
| [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md) | |
| [LegacyCallAPIOptions](./kibana-plugin-core-server.legacycallapioptions.md) | The set of options that defines how API call should be made and result be processed. |
| [LegacyElasticsearchError](./kibana-plugin-core-server.legacyelasticsearcherror.md) | @<!-- -->deprecated. The new elasticsearch client doesn't wrap errors anymore. |
| [LegacyElasticsearchError](./kibana-plugin-core-server.legacyelasticsearcherror.md) | @<!-- -->deprecated. The new elasticsearch client doesn't wrap errors anymore. 7.16 |
| [LegacyRequest](./kibana-plugin-core-server.legacyrequest.md) | |
| [LoggerContextConfigInput](./kibana-plugin-core-server.loggercontextconfiginput.md) | |
| [LoggingServiceSetup](./kibana-plugin-core-server.loggingservicesetup.md) | Provides APIs to plugins for customizing the plugin's logger. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 7.16
>
<b>Signature:</b>
Expand Down
10 changes: 10 additions & 0 deletions src/core/server/elasticsearch/legacy/api_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ import {
*
* @public
* @deprecated
* @removeBy 7.16
*/
export interface LegacyCallAPIOptions {
/**
Expand All @@ -157,6 +158,7 @@ export interface LegacyCallAPIOptions {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface LegacyAPICaller {
Expand Down Expand Up @@ -312,6 +314,7 @@ export interface LegacyAPICaller {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface AssistantAPIClientParams extends GenericParams {
Expand All @@ -321,17 +324,20 @@ export interface AssistantAPIClientParams extends GenericParams {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export type MIGRATION_ASSISTANCE_INDEX_ACTION = 'upgrade' | 'reindex';
/**
* @deprecated
* @removeBy 7.16
* @public
* */
export type MIGRATION_DEPRECATION_LEVEL = 'none' | 'info' | 'warning' | 'critical';

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface AssistanceAPIResponse {
Expand All @@ -344,6 +350,7 @@ export interface AssistanceAPIResponse {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface DeprecationAPIClientParams extends GenericParams {
Expand All @@ -353,6 +360,7 @@ export interface DeprecationAPIClientParams extends GenericParams {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface DeprecationInfo {
Expand All @@ -364,6 +372,7 @@ export interface DeprecationInfo {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface IndexSettingsDeprecationInfo {
Expand All @@ -372,6 +381,7 @@ export interface IndexSettingsDeprecationInfo {

/**
* @deprecated
* @removeBy 7.16
* @public
* */
export interface DeprecationAPIResponse {
Expand Down
3 changes: 3 additions & 0 deletions src/core/server/elasticsearch/legacy/cluster_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const callAPI = async (
* See {@link LegacyClusterClient}.
*
* @deprecated Use {@link IClusterClient}.
* @removeBy 7.16
* @public
*/
export type ILegacyClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser' | 'asScoped'>;
Expand All @@ -89,6 +90,7 @@ export type ILegacyClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser
*
* See {@link LegacyClusterClient}.
* @deprecated Use {@link ICustomClusterClient}.
* @removeBy 7.16
* @public
*/
export type ILegacyCustomClusterClient = Pick<
Expand All @@ -99,6 +101,7 @@ export type ILegacyCustomClusterClient = Pick<
/**
* {@inheritDoc IClusterClient}
* @deprecated Use {@link IClusterClient}.
* @removeBy 7.16
* @public
*/
export class LegacyClusterClient implements ILegacyClusterClient {
Expand Down
1 change: 1 addition & 0 deletions src/core/server/elasticsearch/legacy/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum ErrorCode {

/**
* @deprecated. The new elasticsearch client doesn't wrap errors anymore.
* @removeBy 7.16
* @public
* */
export interface LegacyElasticsearchError extends Boom.Boom {
Expand Down
4 changes: 4 additions & 0 deletions src/core/server/elasticsearch/legacy/scoped_cluster_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { LegacyAPICaller, LegacyCallAPIOptions } from './api_types';
* See {@link LegacyScopedClusterClient}.
*
* @deprecated Use {@link IScopedClusterClient}.
* @removeBy 7.16
* @public
*/
export type ILegacyScopedClusterClient = Pick<
Expand All @@ -29,6 +30,7 @@ export type ILegacyScopedClusterClient = Pick<
/**
* {@inheritDoc IScopedClusterClient}
* @deprecated Use {@link IScopedClusterClient | scoped cluster client}.
* @removeBy 7.16
* @public
*/
export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
Expand All @@ -46,6 +48,7 @@ export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
* Kibana internal user.
* See {@link LegacyAPICaller}.
* @deprecated Use {@link IScopedClusterClient.asInternalUser}.
* @removeBy 7.16
*
* @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`.
* @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client.
Expand All @@ -64,6 +67,7 @@ export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
* user initiated request to the Kibana server (via HTTP request headers).
* See {@link LegacyAPICaller}.
* @deprecated Use {@link IScopedClusterClient.asCurrentUser}.
* @removeBy 7.16
*
* @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`.
* @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client.
Expand Down
8 changes: 8 additions & 0 deletions src/core/server/elasticsearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ElasticsearchServiceSetup {
readonly config$: Observable<ElasticsearchConfig>;
/**
* @deprecated
* @removeBy 7.16
* Use {@link ElasticsearchServiceStart.legacy | ElasticsearchServiceStart.legacy.createClient} instead.
*
* Create application specific Elasticsearch cluster API client with customized config. See {@link ILegacyClusterClient}.
Expand All @@ -60,6 +61,7 @@ export interface ElasticsearchServiceSetup {
) => ILegacyCustomClusterClient;

/**
* @removeBy 7.16
* @deprecated
* Use {@link ElasticsearchServiceStart.legacy | ElasticsearchServiceStart.legacy.client} instead.
*
Expand Down Expand Up @@ -131,6 +133,9 @@ export interface ElasticsearchServiceStart {
/**
* Create application specific Elasticsearch cluster API client with customized config. See {@link ILegacyClusterClient}.
*
* @deprecated
* @removeBy 7.16
*
* @param type Unique identifier of the client
* @param clientConfig A config consists of Elasticsearch JS client options and
* valid sub-set of Elasticsearch service config.
Expand All @@ -153,6 +158,9 @@ export interface ElasticsearchServiceStart {
/**
* A pre-configured {@link ILegacyClusterClient | legacy Elasticsearch client}.
*
* @deprecated
* @removeBy 7.16
*
* @example
* ```js
* const client = core.elasticsearch.legacy.client;
Expand Down

0 comments on commit d97f958

Please sign in to comment.