-
Notifications
You must be signed in to change notification settings - Fork 25k
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 Support for Deprecated REST Handler #17687
Comments
align the message with the deprecated settings message?
do we also want: controller.registerRemovedEndpoint(POST, "/_optimize"); that will emit:
|
As a bonanza, adding an HTTP header containing the same might be useful (the client might not have access to the server logs where the deprecation logging would be emitted)? |
++
I was going to comment that the clients don't expose headers at all, so this info would be hidden. But actually, the clients all have logging facilities. I think the clients should look for these headers and warn if found. This would improve the discoverability of deprecations (#8963) which currently require deprecation logging to be specifically enabled. It'd also make it easier to figure out which requests are using deprecated syntax. |
Is there a preferred, existing header for this? As a side note, I took a look for a better response code, and there does exist Along with 299, it also brings along some other headers that seem highly relevant: https://tools.ietf.org/html/rfc7234#section-5.5
This would allow us to signal a valid response without breaking anyone that checks for a I think that the way it should be handled is:
What do we think? |
I think that we can use the I do not think that we should change the status code. I especially do not think that we should use 299 from RFC 7234; while RFC 7234 is published on the Standards Track it is still in Proposed Standard status (as of 2016-04-13). I doubt that clients will properly handle this. |
@elastic/es-clients see #17687 (comment) |
As we change our REST Endpoints, particularly with simple examples like going from
_optimize
to_forcemerge
, we should use the deprecation logger to announce the deprecation to the user.Hopefully it's as simple as adding something along the lines of
I'm interested to hear what people might want to see as part of the deprecation notice though. I wouldn't want to make it too fancy, but it might be nice to say something along the lines of "see _forcemerge".
What do you think @clintongormley?
The text was updated successfully, but these errors were encountered: