Skip to content

Commit

Permalink
Add allowed warnings for yaml rest test that using master_timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Mar 30, 2022
1 parent b892805 commit 4ac10f6
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ setup:
- skip:
version: " - 7.3.99"
reason: index cloning was added in 7.4.0
features: allowed_warnings
# make it read-only
- do:
indices.put_settings:
Expand All @@ -46,6 +47,8 @@ setup:

# now we do the actual clone
- do:
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."
indices.clone:
index: "source"
target: "target"
Expand Down Expand Up @@ -94,9 +97,12 @@ setup:
- skip:
version: " - 7.3.99"
reason: index cloning was added in 7.4.0
features: allowed_warnings
# try to do an illegal clone with illegal number_of_shards
- do:
catch: /illegal_argument_exception/
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."
indices.clone:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- skip:
version: " - 7.3.99"
reason: index cloning was added in 7.4.0
features: allowed_warnings
# create index
- do:
indices.create:
Expand Down Expand Up @@ -50,6 +51,8 @@

# now we do the actual clone
- do:
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."
indices.clone:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- skip:
version: " - 7.3.99"
reason: index cloning was added in 7.4.0
features: [arbitrary_key]
features: [arbitrary_key, allowed_warnings]

- do:
nodes.info:
Expand Down Expand Up @@ -36,6 +36,8 @@

# now we do an actual clone and copy settings
- do:
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."
indices.clone:
index: "source"
target: "copy-settings-target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# which node is the one with the highest version and that is the only one that can safely
# be used to shrink the index.

- skip:
features: allowed_warnings

- do:
nodes.info:
node_id: data:true
Expand Down Expand Up @@ -53,6 +56,8 @@

# now we do the actual shrink
- do:
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."
indices.shrink:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- skip:
version: " - 6.9.99"
reason: expects warnings that pre-7.0.0 will not send
features: [warnings, arbitrary_key]
features: [warnings, arbitrary_key, allowed_warnings]

- do:
nodes.info:
Expand Down Expand Up @@ -60,6 +60,10 @@

# now we do the actual shrink
- do:
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."
indices.shrink:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
index.merge.scheduler.max_thread_count: 2
allowed_warnings:
- "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."

- do:
cluster.health:
Expand All @@ -64,6 +65,8 @@

# now we do a actual shrink and copy settings (by default)
- do:
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."
indices.shrink:
index: "source"
target: "default-copy-settings-target"
Expand Down Expand Up @@ -91,6 +94,8 @@
# now we do a actual shrink and try to set no copy settings
- do:
catch: /illegal_argument_exception/
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."
indices.shrink:
index: "source"
target: "explicit-no-copy-settings-target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ setup:

---
"Split index via API":
- skip:
features: allowed_warnings

# make it read-only
- do:
indices.put_settings:
Expand All @@ -44,6 +47,8 @@ setup:

# now we do the actual split
- do:
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."
indices.split:
index: "source"
target: "target"
Expand Down Expand Up @@ -90,6 +95,8 @@ setup:

---
"Split from 1 to N":
- skip:
features: allowed_warnings
- do:
indices.create:
index: source_one_shard
Expand Down Expand Up @@ -131,6 +138,8 @@ setup:

# now we do the actual split from 1 to 5
- do:
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."
indices.split:
index: "source_one_shard"
target: "target"
Expand Down Expand Up @@ -176,9 +185,14 @@ setup:

---
"Create illegal split indices":
- skip:
features: allowed_warnings

# try to do an illegal split with number_of_routing_shards set
- do:
catch: /illegal_argument_exception/
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."
indices.split:
index: "source"
target: "target"
Expand All @@ -193,6 +207,8 @@ setup:
# try to do an illegal split with illegal number_of_shards
- do:
catch: /illegal_state_exception/
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."
indices.split:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
"Split index ignores target template mapping":
- skip:
features: allowed_warnings

# create index
- do:
indices.create:
Expand Down Expand Up @@ -48,6 +51,8 @@

# now we do the actual split
- do:
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."
indices.split:
index: "source"
target: "target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
index.merge.scheduler.max_thread_count: 2
allowed_warnings:
- "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."


- do:
Expand All @@ -67,6 +70,8 @@

# now we do a actual shrink and copy settings (by default)
- do:
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."
indices.split:
index: "source"
target: "default-copy-settings-target"
Expand Down Expand Up @@ -94,6 +99,8 @@

- do:
catch: /illegal_argument_exception/
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."
indices.split:
index: "source"
target: "explicit-no-copy-settings-target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import static org.opensearch.rest.RestRequest.Method.POST;

public class RestIndicesAliasesAction extends BaseRestHandler {

private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndicesAliasesAction.class);

@Override
Expand Down

0 comments on commit 4ac10f6

Please sign in to comment.