Change deprecation message for REST API parameter 'master_timeout' to specify the version of removal (#2863)

Signed-off-by: Tianli Feng <ftianli@amazon.com>
This commit is contained in:
Tianli Feng 2022-04-11 15:59:04 -07:00 committed by GitHub
parent 7dd171d48a
commit ba8657aca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 21 additions and 21 deletions

View File

@ -48,7 +48,7 @@ setup:
# now we do the actual clone # now we do the actual clone
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.clone: indices.clone:
index: "source" index: "source"
target: "target" target: "target"
@ -102,7 +102,7 @@ setup:
- do: - do:
catch: /illegal_argument_exception/ catch: /illegal_argument_exception/
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.clone: indices.clone:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -52,7 +52,7 @@
# now we do the actual clone # now we do the actual clone
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.clone: indices.clone:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -37,7 +37,7 @@
# now we do an actual clone and copy settings # now we do an actual clone and copy settings
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.clone: indices.clone:
index: "source" index: "source"
target: "copy-settings-target" target: "copy-settings-target"

View File

@ -57,7 +57,7 @@
# now we do the actual shrink # now we do the actual shrink
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.shrink: indices.shrink:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -61,7 +61,7 @@
# now we do the actual shrink # now we do the actual shrink
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.shrink: indices.shrink:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -47,7 +47,7 @@
index.merge.scheduler.max_thread_count: 2 index.merge.scheduler.max_thread_count: 2
allowed_warnings: allowed_warnings:
- "parameter [copy_settings] is deprecated and will be removed in 8.0.0" - "parameter [copy_settings] is deprecated and will be removed in 8.0.0"
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
- do: - do:
cluster.health: cluster.health:
@ -66,7 +66,7 @@
# now we do a actual shrink and copy settings (by default) # now we do a actual shrink and copy settings (by default)
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.shrink: indices.shrink:
index: "source" index: "source"
target: "default-copy-settings-target" target: "default-copy-settings-target"
@ -95,7 +95,7 @@
- do: - do:
catch: /illegal_argument_exception/ catch: /illegal_argument_exception/
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.shrink: indices.shrink:
index: "source" index: "source"
target: "explicit-no-copy-settings-target" target: "explicit-no-copy-settings-target"

View File

@ -48,7 +48,7 @@ setup:
# now we do the actual split # now we do the actual split
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "target" target: "target"
@ -139,7 +139,7 @@ setup:
# now we do the actual split from 1 to 5 # now we do the actual split from 1 to 5
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source_one_shard" index: "source_one_shard"
target: "target" target: "target"
@ -192,7 +192,7 @@ setup:
- do: - do:
catch: /illegal_argument_exception/ catch: /illegal_argument_exception/
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "target" target: "target"
@ -208,7 +208,7 @@ setup:
- do: - do:
catch: /illegal_state_exception/ catch: /illegal_state_exception/
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -52,7 +52,7 @@
# now we do the actual split # now we do the actual split
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "target" target: "target"

View File

@ -49,7 +49,7 @@
index.merge.scheduler.max_thread_count: 2 index.merge.scheduler.max_thread_count: 2
allowed_warnings: allowed_warnings:
- "parameter [copy_settings] is deprecated and will be removed in 8.0.0" - "parameter [copy_settings] is deprecated and will be removed in 8.0.0"
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
- do: - do:
cluster.health: cluster.health:
@ -68,7 +68,7 @@
# now we do a actual shrink and copy settings (by default) # now we do a actual shrink and copy settings (by default)
- do: - do:
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "default-copy-settings-target" target: "default-copy-settings-target"
@ -97,7 +97,7 @@
- do: - do:
catch: /illegal_argument_exception/ catch: /illegal_argument_exception/
allowed_warnings: allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version." - "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.split: indices.split:
index: "source" index: "source"
target: "explicit-no-copy-settings-target" target: "explicit-no-copy-settings-target"

View File

@ -219,7 +219,7 @@ public abstract class BaseRestHandler implements RestHandler {
String logMsgKeyPrefix String logMsgKeyPrefix
) { ) {
final String MASTER_TIMEOUT_DEPRECATED_MESSAGE = final String MASTER_TIMEOUT_DEPRECATED_MESSAGE =
"Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version."; "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead.";
final String DUPLICATE_PARAMETER_ERROR_MESSAGE = final String DUPLICATE_PARAMETER_ERROR_MESSAGE =
"Please only use one of the request parameters [master_timeout, cluster_manager_timeout]."; "Please only use one of the request parameters [master_timeout, cluster_manager_timeout].";
if (request.hasParam("master_timeout")) { if (request.hasParam("master_timeout")) {

View File

@ -63,7 +63,7 @@ public class RestGetMappingAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetMappingAction.class); private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetMappingAction.class);
private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE = private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE =
"Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version."; "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead.";
private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE = private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE =
"Please only use one of the request parameters [master_timeout, cluster_manager_timeout]."; "Please only use one of the request parameters [master_timeout, cluster_manager_timeout].";

View File

@ -86,7 +86,7 @@ public class RestIndicesAction extends AbstractCatAction {
private static final DateFormatter STRICT_DATE_TIME_FORMATTER = DateFormatter.forPattern("strict_date_time"); private static final DateFormatter STRICT_DATE_TIME_FORMATTER = DateFormatter.forPattern("strict_date_time");
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndicesAction.class); private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndicesAction.class);
private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE = private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE =
"Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version."; "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead.";
private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE = private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE =
"Please only use one of the request parameters [master_timeout, cluster_manager_timeout]."; "Please only use one of the request parameters [master_timeout, cluster_manager_timeout].";

View File

@ -78,7 +78,7 @@ public class RenamedTimeoutRequestParameterTests extends OpenSearchTestCase {
private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE = private static final String DUPLICATE_PARAMETER_ERROR_MESSAGE =
"Please only use one of the request parameters [master_timeout, cluster_manager_timeout]."; "Please only use one of the request parameters [master_timeout, cluster_manager_timeout].";
private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE = private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE =
"Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version."; "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead.";
@After @After
public void terminateThreadPool() { public void terminateThreadPool() {