Skip to content

Commit d5b554d

Browse files
Add migration API examples (#3437) (#3448)
(cherry picked from commit 2d49d47) Co-authored-by: Lisa Cawley <[email protected]>
1 parent ac8e583 commit d5b554d

File tree

11 files changed

+123
-18
lines changed

11 files changed

+123
-18
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 22 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping
306306
mean-reciprocal,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-rank-eval.html#_mean_reciprocal_rank
307307
migrate-index-allocation-filters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-index-allocation-filters.html
308308
migration-api-deprecation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-deprecation.html
309-
migration-api-feature-upgrade,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-feature-upgrade.html
309+
migration-api-feature-upgrade,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/feature-migration-api.html
310310
ml-apis,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ml-apis.html
311311
ml-classification,https://www.elastic.co/guide/en/machine-learning/{branch}/ml-dfa-classification.html
312312
ml-close-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ml-close-job.html

specification/migration/deprecations/DeprecationInfoRequest.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ import { IndexName } from '@_types/common'
2424
* Get deprecation information.
2525
* Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
2626
*
27-
* TIP: This APIs is designed for indirect use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant.
27+
* TIP: This APIs is designed for indirect use by the Upgrade Assistant.
28+
* You are strongly recommended to use the Upgrade Assistant.
2829
* @rest_spec_name migration.deprecations
2930
* @availability stack since=6.1.0 stability=stable
3031
* @cluster_privileges manage
32+
* @doc_id migration-api-deprecation
3133
*/
3234
export interface Request extends RequestBase {
3335
path_parts: {

specification/migration/deprecations/DeprecationInfoResponse.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,24 @@ import { Deprecation } from './types'
2222

2323
export class Response {
2424
body: {
25+
/**
26+
* Cluster-level deprecation warnings.
27+
*/
2528
cluster_settings: Deprecation[]
29+
/**
30+
* Index warnings are sectioned off per index and can be filtered using an index-pattern in the query.
31+
* This section includes warnings for the backing indices of data streams specified in the request path.
32+
*/
2633
index_settings: Dictionary<string, Deprecation[]>
2734
data_streams: Dictionary<string, Deprecation[]>
35+
/**
36+
* Node-level deprecation warnings.
37+
* Since only a subset of your nodes might incorporate these settings, it is important to read the details section for more information about which nodes are affected.
38+
*/
2839
node_settings: Deprecation[]
40+
/**
41+
* Machine learning-related deprecation warnings.
42+
*/
2943
ml_settings: Deprecation[]
3044
}
3145
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# summary:
2+
description: >
3+
An abbreviated response from `GET /_migration/deprecations`.
4+
# type: "response"
5+
# response_code: 200
6+
value:
7+
cluster_settings:
8+
- level: critical
9+
message: "Cluster name cannot contain ':'"
10+
url: 'https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name'
11+
details: "This cluster is named [mycompany:logging], which contains the illegal character ':'."
12+
node_settings: []
13+
index_settings:
14+
'logs:apache':
15+
- level: warning
16+
message: "Index name cannot contain ':'"
17+
url: 'https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name'
18+
details: "This index is named [logs:apache], which contains the illegal character ':'."
19+
ml_settings: []

specification/migration/deprecations/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ export enum DeprecationLevel {
3030
}
3131

3232
export class Deprecation {
33+
/**
34+
* Optional details about the deprecation warning.
35+
*/
3336
details?: string
3437
/** The level property describes the significance of the issue. */
3538
level: DeprecationLevel
39+
/** Descriptive information about the deprecation warning. */
3640
message: string
41+
/**
42+
* A link to the breaking change documentation, where you can find more information about this change.
43+
*/
3744
url: string
3845
resolve_during_rolling_upgrade: boolean
3946
_meta?: Dictionary<string, UserDefinedValue>

specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ import { RequestBase } from '@_types/Base'
2525
* Check which features need to be migrated and the status of any migrations that are in progress.
2626
*
2727
* TIP: This API is designed for indirect use by the Upgrade Assistant.
28-
* We strongly recommend you use the Upgrade Assistant.
28+
* You are strongly recommended to use the Upgrade Assistant.
2929
* @rest_spec_name migration.get_feature_upgrade_status
3030
* @availability stack since=7.16.0 stability=stable
3131
* @index_privileges manage
3232
* @cluster_privileges manage
33+
* @doc_id migration-api-feature-upgrade
3334
*/
3435
export interface Request extends RequestBase {}

0 commit comments

Comments
 (0)