-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Remove @UpdateForV9
annotation from ReindexRequest#failOnSizeSpecified
#122729
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
Conversation
…fied` We do need this check to make sure we don't silently accept requests with ignored `size` parameter specified since `max_docs` is optional. We want to notify users that they must use `max_docs` and specifying `size` is a mistake. This behaviour is tested in the `reindex/20_validation/specifying size fails` test.
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
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.
This doesn't actually address the task tho. We haven't supported size
for all of 8.x, see #43373. I don't think we need to treat this parameter specially any more, we can just reject it as if it were any other unknown parameter.
3da329b
to
495b0fd
Compare
495b0fd
to
9914525
Compare
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.
Please don't force-push to branches once they're under review, it makes it really hard to keep track of comments etc.
body: { "text": "test" } | ||
|
||
- do: | ||
catch: /invalid parameter \[size\], use \[max_docs\] instead/ |
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.
Could we instead keep the test but generalize this regex to handle both the old specialized message and the new general one?
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.
Thanks, I've updated it!
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
@@ -167,3 +167,7 @@ if (OS.current() == OS.WINDOWS) { | |||
} | |||
} | |||
} | |||
|
|||
tasks.named("yamlRestCompatTestTransform").configure { task -> | |||
task.skipTest("reindex/20_validation/specifying size fails", "size is rejected in 9.0") |
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.
Can't check the compatibility mode for the parameter rejected by the parser, so the compatibility test
./gradlew ":modules:reindex:yamlRestCompatTest" --tests "org.elasticsearch.index.reindex.ReindexClientYamlTestSuiteIT.test {yaml=reindex/20_validation/specifying size fails}"
fails if we don't mute it.
LGTM still |
💚 Backport successful
|
…fied` (elastic#122729) The size parameter hasn't been accepted since 8.0, end users should use max_docs and if the user specify it, we can defer to the standard error message produced by the parser.
We do need this check to make sure we don't silently accept requests with ignoredsize
parameter specified sincemax_docs
is optional. We want to notify users that they must usemax_docs
and specifyingsize
is a mistake.This behaviour is tested in thereindex/20_validation/specifying size fails
test.The
size
parameter hasn't been accepted since 8.0, end users should usemax_docs
and if the user specify it, we can defer to the standard error message produced by the parser.