-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
[REST API compatibility] special handling for _freeze #79861
Merged
Merged
Conversation
This file contains 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
We just always respond with a 400 bad request (even if you ask to freeze an index that doesn't actually exist).
404 on an index that doesn't exist, 410 on one that does exist.
…rest-compatibility
joegallo
added
>non-issue
:Data Management/Indices APIs
APIs to create and manage indices and templates
v8.0.0
labels
Oct 26, 2021
elasticmachine
added
the
Team:Data Management
Meta label for data/management team
label
Oct 26, 2021
Pinging @elastic/es-data-management (Team:Data Management) |
On 7.16 it fails with a 400 bad request because we don't allow this operation (semantically), on master it was failing with a 400 bad request because we removed the freeze endpoint entirely, so it happened to pass. Now that I have _freeze requests responding with 410 gone, this test is now failing, so we have to skip it. This surprised me a little at first, but I really do think this is all correct.
jakelandis
approved these changes
Oct 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Data Management/Indices APIs
APIs to create and manage indices and templates
>non-issue
Team:Data Management
Meta label for data/management team
v8.0.0-beta1
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.
Follow up to #78918, replaces #74705
The squash merge commit in this middle of this PR is just #79859, you can ignore it here and review it there.
#78918 removed the
_freeze
endpoint entirely, which means we respond to_freeze
requests with a400 Bad Request
and a response body like{"error":"no handler found for uri [/tweets-1/_freeze] and method [POST]"}
-- that is, the standard Elasticsearch "you've got the wrong method and/or url" response.That's definitely the right treatment for a normal request, but if the client specifies
compatible-with=7
on their request, then we should have a better response -- I've gone with410 Gone
and: