-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Expand max chain depth testing #61833
Expand max chain depth testing #61833
Conversation
This commit extends the coverage around max chain depth in runtime fields. We test that direct references are not counted, that 5 references are allowed while 6 are not, and we test that the same error is returned no matter where the runtime field is used.
Pinging @elastic/es-search (:Search/Search) |
body: | ||
sort: loose_loop | ||
--- | ||
"loose loop - docvalue_fields": |
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.
I am aware that splitting tests like this will cause more setup / tear down, yet I think it makes the tests less descriptive and targeted each one at their own specific goal.
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.
Makes sense to me. 👍
index: sensor | ||
body: | ||
sort: timestamp | ||
docvalue_fields: [over_max_depth] |
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.
Note that there are no tests for queries, on purpose. They need to be fixed :)
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.
Yeah, I have this on my list but I keep getting distracted by shiny objects.
Lgtm
…On Wed, Sep 2, 2020, 04:06 Luca Cavanna ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
x-pack/plugin/src/test/resources/rest-api-spec/test/runtime_fields/90_loops.yml
<#61833 (comment)>
:
> +"Max chain depth - sort":
+ - do:
+ catch: '/Field requires resolving too many dependent fields: over_max_depth -> over_max_depth_1 -> over_max_depth_2 -> over_max_depth_3 -> over_max_depth_4 -> over_max_depth_5/'
+ search:
+ index: sensor
+ body:
+ sort: over_max_depth
+---
+"Max chain depth - docvalue_fields":
+ - do:
+ catch: '/Field requires resolving too many dependent fields: over_max_depth -> over_max_depth_1 -> over_max_depth_2 -> over_max_depth_3 -> over_max_depth_4 -> over_max_depth_5/'
+ search:
+ index: sensor
+ body:
+ sort: timestamp
+ docvalue_fields: [over_max_depth]
Note that there are not tests for queries, on purpose. They need to be
fixed :)
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#61833 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUXIUTJ33JTEXKGAYJUV3SDX4HRANCNFSM4QSWROPA>
.
|
This commit extends the coverage around max chain depth in runtime fields. We test that direct references are not counted, that 5 references are allowed while 6 are not, and we test that the same error is returned no matter where the runtime field is used.