Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix yaml rest test by adding allow warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Tianli Feng committed Mar 14, 2022
1 parent 7531fb7 commit ac29883
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -158,6 +158,7 @@ setup:
- skip:
version: " - 6.3.99"
reason: "cluster state including cluster_uuid at the top level is new in v6.4.0 and higher"
features: allowed_warnings

# Get the current cluster_uuid
- do:
@@ -167,6 +168,8 @@ setup:
- do:
cluster.state:
metric: [ master_node, version ]
allowed_warnings:
- 'Deprecated value [master_node] used for parameter [metric]. To promote inclusive language, please use [cluster_manager_node] instead. It will be unsupported in a future major version.'

- match: { cluster_uuid: $cluster_uuid }
- is_true: master_node
Original file line number Diff line number Diff line change
@@ -125,7 +125,9 @@ public RestChannelConsumer prepareRequest(final RestRequest request, final NodeC
|| metrics.contains(ClusterState.Metric.CLUSTER_MANAGER_NODE)
);
// TODO: Remove the DeprecationLogger after removing MASTER_ROLE.
if (metrics.contains(ClusterState.Metric.MASTER_NODE)) {
// Because "_all" value will add all Metric into metrics set, for prevent deprecation message shown in that case,
// add the check of validating Metric.CLUSTER_MANAGER_NODE is not in the metrics set.
if (metrics.contains(ClusterState.Metric.MASTER_NODE) && !metrics.contains(ClusterState.Metric.CLUSTER_MANAGER_NODE)) {
deprecationLogger.deprecate("cluster_state_metric_parameter_master_node_value", DEPRECATED_MESSAGE_MASTER_NODE);
}
/*

0 comments on commit ac29883

Please sign in to comment.