Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request parameter 'cluster_manager_timeout' and deprecate 'master_timeout' - in Snapshot APIs #2680

Merged
merged 12 commits into from
Apr 12, 2022
Merged
Prev Previous commit
Use support instead of promote in the deprecation message
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Apr 12, 2022
commit 712952e3acdceec9f0aa30a91d6cd465f91a4c9f
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ setup:
# Remove the snapshots
- 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."
- "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
snapshot.delete:
repository: repository
snapshot: snapshot-two
master_timeout: 5m

- 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."
- "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
snapshot.delete:
repository: repository
snapshot: snapshot-one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description" : "Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description":"Explicit operation timeout for connection to master node",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
"description":"To support inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ public void testCleanupRepository() {
public void testCloneSnapshot() {
RestCloneSnapshotAction action = new RestCloneSnapshotAction();
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand Down Expand Up @@ -584,8 +584,8 @@ public void testGetSnapshots() {
public void testPutRepository() {
RestPutRepositoryAction action = new RestPutRepositoryAction();
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand All @@ -611,7 +611,7 @@ public void testVerifyRepository() {
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
}

private MasterNodeRequest getMasterNodeRequest() {
return new MasterNodeRequest() {
@Override
Expand Down