Use query param instead of a system property for opting in for new cluster health response code#79351
Merged
arteam merged 20 commits intoelastic:masterfrom Oct 18, 2021
Merged
Conversation
…uster health response code
e43fefc to
7bfe441
Compare
Contributor
Author
|
@elasticmachine update branch |
Collaborator
|
Pinging @elastic/clients-team (Team:Clients) |
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
reviewed
Oct 18, 2021
Member
DaveCTurner
left a comment
There was a problem hiding this comment.
Looks good, just a few small comments.
server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java
Show resolved
Hide resolved
…alth/ClusterHealthResponse.java Co-authored-by: David Turner <david.turner@elastic.co>
93e69ba to
95652e4
Compare
DaveCTurner
approved these changes
Oct 18, 2021
Member
DaveCTurner
left a comment
There was a problem hiding this comment.
I think we should add the following YAML REST test too:
diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.health/20_request_timeout.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.health/20_request_timeout.yml
index 66a7cb2b48d..6bd4f5fdb8e 100644
--- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.health/20_request_timeout.yml
+++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.health/20_request_timeout.yml
@@ -35,3 +35,23 @@
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- gte: { number_of_pending_tasks: 0 }
+
+
+---
+"cluster health request timeout with 200 response code":
+ - do:
+ cluster.health:
+ timeout: 1ms
+ wait_for_active_shards: 5
+ return_200_for_cluster_health_timeout: true
+
+ - is_true: cluster_name
+ - is_true: timed_out
+ - gte: { number_of_nodes: 1 }
+ - gte: { number_of_data_nodes: 1 }
+ - match: { active_primary_shards: 0 }
+ - match: { active_shards: 0 }
+ - match: { relocating_shards: 0 }
+ - match: { initializing_shards: 0 }
+ - match: { unassigned_shards: 0 }
+ - gte: { number_of_pending_tasks: 0 }Other than that, LGTM.
...ck/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/utils/MlIndexAndAliasTests.java
Outdated
Show resolved
Hide resolved
DaveCTurner
reviewed
Oct 18, 2021
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClusterHealthAction.java
Outdated
Show resolved
Hide resolved
…ml/utils/MlIndexAndAliasTests.java Co-authored-by: David Turner <david.turner@elastic.co>
…er/RestClusterHealthAction.java Co-authored-by: David Turner <david.turner@elastic.co>
…eout query parameter
Contributor
Author
|
Thanks a bunch, David! |
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Oct 18, 2021
…new cluster health response code Backport elastic#79351 to 7.x: The original change was implemented in elastic#78940, but we have decided to move from a system property to a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code. Relates elastic#70849
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Oct 19, 2021
* upstream/master: (34 commits) Add extensionName() to security extension (elastic#79329) More robust and consistent allowAll indicesAccessControl (elastic#79415) Fix circuit breaker leak in MultiTerms aggregation (elastic#79362) guard geoline aggregation from parents aggegator that emit empty buckets (elastic#79129) Vector tiles: increase the size of the envelope used to clip geometries (elastic#79030) Revert "[ML] Add queue_capacity setting to start deployment API (elastic#79369)" (elastic#79374) Convert token service license object to LicensedFeature (elastic#79284) [TEST] Fix ShardPathTests for MDP (elastic#79393) Fix fleet search API with no checkpints (elastic#79400) Reduce BWC version for transient settings (elastic#79396) EQL: Rename a test class for eclipse (elastic#79254) Use search_coordination threadpool in field caps (elastic#79378) Use query param instead of a system property for opting in for new cluster health response code (elastic#79351) Add new kNN search endpoint (elastic#79013) Disable BWC tests Convert auditing license object to LicensedFeature (elastic#79280) Update BWC versions after backport of elastic#78551 Enable InstantiatingObjectParser to pass context as a first argument (elastic#79206) Move xcontent filtering tests (elastic#79298) Update links to Fleet/Agent docs (elastic#79303) ...
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Oct 19, 2021
…new cluster health response code (elastic#79397) Backport elastic#79351 to 7.x: The original change was implemented in elastic#78940, but we have decided to move from a system property to a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code. Relates elastic#70849
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Oct 19, 2021
Documents the deprecation introduced in elastic#78180 and adjusted in elastic#79351.
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Oct 19, 2021
Trivial follow-up to elastic#79351 that introduced some spots that create fresh empty string arrays.
This was referenced Oct 19, 2021
arteam
pushed a commit
that referenced
this pull request
Oct 19, 2021
Trivial follow-up to #79351 that introduced some spots that create fresh empty string arrays.
DaveCTurner
added a commit
that referenced
this pull request
Oct 19, 2021
DaveCTurner
added a commit
that referenced
this pull request
Oct 19, 2021
Trivial follow-up to #79351 that introduced some spots that create fresh empty string arrays.
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Nov 18, 2021
…r new cluster health response code (elastic#79351)" This reverts commit 8901a99
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Nov 18, 2021
…r new cluster health response code (elastic#79351)" This reverts commit 8901a99
arteam
added a commit
that referenced
this pull request
Nov 18, 2021
#78968)" (#80826) * [8.0] Revert "Return 200 OK response code for a cluster health timeout (#78968)" This reverts commit a2c3dae * Revert "Allow deprecation warning for the return_200_for_cluster_health_timeout parameter (#80178) (#80444)" This reverts commit 4102cf7. * Revert "Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551)" This reverts commit b9fbe66. * Revert "Adjust the BWC version for the return200ForClusterHealthTimeout field (#79436)" This reverts commit f60bda5. * Revert "Use query param instead of a system property for opting in for new cluster health response code (#79351)" This reverts commit 8901a99 * Revert "Deprecate returning 408 for a server timeout on `_cluster/health` (#78180)" This reverts commit f266eb3 * Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551) This reverts commit fa4d562. * Revert "[8.0] Disable BWC for #80821 (#80840)"
arteam
added a commit
that referenced
this pull request
Nov 18, 2021
)" (#80821) * Revert "Return 200 OK response code for a cluster health timeout (#78968)" This reverts commit a2c3dae * Revert "Allow deprecation warning for the return_200_for_cluster_health_timeout parameter (#80178)" This reverts commit 1c711e3. * Revert "Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551)" This reverts commit b9fbe66. * Revert "Adjust the BWC version for the return200ForClusterHealthTimeout field (#79436)" This reverts commit f60bda5. * Revert "Use query param instead of a system property for opting in for new cluster health response code (#79351)" This reverts commit 8901a99 * Revert "Deprecate returning 408 for a server timeout on `_cluster/health` (#78180)" This reverts commit f266eb3 * Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551) This reverts commit fa4d562 * Revert "Disable BWC for #80821 (#80839)" This reverts commit cb0e73e. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original change was implemented in #78940, bu we have decided to move from a system property to an a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code.
References #70849