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 deprecation docs for cluster health HTTP code #79451

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/reference/migration/migrate_7_16.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,30 @@ To avoid deprecation warnings, discontinue use of transient settings when modify
your cluster settings through the `PUT _cluster/settings` REST API. When modifying cluster settings
use only persistent settings.
====

[discrete]
[[breaking_716_cluster_deprecations]]
==== Cluster deprecations

[[deprecate-cluster-health-408]]
.Distinguishing cluster health timeout status by HTTP response code is now deprecated.
[%collapsible]
====
*Details* +
The <<cluster-health>> API includes options for waiting for certain health
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by comment: We can't use internal links (<<blah>>) in the migration guide. This will break when we reuse the docs in the Install and Upgrade Guide. We need to use external links instead.

Suggested change
The <<cluster-health>> API includes options for waiting for certain health
The {ref}/cluster-health.html[cluster health API] includes options for waiting for certain health

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bah I clicked the button without seeing this, ok I'll fix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Sorry for commenting so late! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #79486 suggesting that this should fail the build.

conditions to be satisfied. If the requested conditions are not satisfied
within a timeout then {es} will send back a normal response including the field
`"timed_out": true`. In earlier versions it would also use the HTTP response
code `408 Request timeout` if the request timed out, and `200 OK` otherwise.
The `408 Request timeout` response code is not appropriate for this situation
and its use is deprecated. Future versions will use the response code `200 OK`
for both cases.

*Impact* +
Update your application to read the `"timed_out"` field of the response instead
of the HTTP response code to determine whether the request timed out or not. To
avoid deprecation warnings and opt into the future behaviour, include the query
parameter `?return_200_for_cluster_health_timeout` in your request.
====

// end::notable-breaking-changes[]