-
Notifications
You must be signed in to change notification settings - Fork 53
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
Added aggregation tests for avg, max, min, range, terms, sum, nested and histogram. #576
Conversation
680bad4
to
917db1e
Compare
Changes AnalysisCommit SHA: 1ce95ea API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11094040873/artifacts/1992639674 API Coverage
|
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!
Looks like tests failed on 2.0, possibly because the feature wasn't there, so the test needs to be annotated accordingly.
Run npm run lint--fix
for the linter to be happy.
I have some more nitpicks below.
1096345
to
4068e1c
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.
Some tests against 2.x failed, probably needs a version:
somewhere.
4068e1c
to
d9fe829
Compare
It's |
d9fe829
to
2a32f1f
Compare
@dblock Thank you for your patient review, I'm not familiar with |
The Take a moment to read https://github.com/opensearch-project/opensearch-api-specification/blob/main/DEVELOPER_GUIDE.md and https://github.com/opensearch-project/opensearch-api-specification/blob/main/TESTING_GUIDE.md. I know it's a lot. We test an entire matrix of versions of OpenSearch, the 2.0 tests are failing. If you want to run those locally, it's basically starting a container with |
@dblock sorry for the latency reply(a bit busy), I will continue to follow up now. |
2a32f1f
to
e8f8ca8
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.
Thanks! LMK when it's ready to be reviewed.
Some of this should work in 2.17, right?
e8f8ca8
to
bc05ea0
Compare
@dblock thanks for your help, I know how to test.
When I test the aggregation, it throws the exception:
It seems that I should define the response schema of the aggregation, I try a long time to define user-input |
Given the search response:
it's a
if we replace this with just a vanilla object with any property (
An
If we make the aggregate match our return value the spec also passes.
But if we add the other possibilities, it fails!
This is where I've had a 🤦 moment multiple times. Turns out that The fix is to change
Note that each aggregation correctly uses
Rebase, then merge https://github.com/dblock/opensearch-api-specification/tree/kkewwei-add_nested_aggs onto your branch? I was on a plane and added some more agg tests on top. |
Signed-off-by: kkewwei <[email protected]> Signed-off-by: kewei.11 <[email protected]>
bc05ea0
to
8ab8454
Compare
Spec Test Coverage Analysis
|
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.
Let's add a 1-liner to CHANGELOG, maybe "Fix /{index}/_search
with aggregations
"?
Link checker is failing not sure how to fix that ... unrelated but if you have an idea include that.
…ogram. Signed-off-by: dblock <[email protected]> Signed-off-by: kkewwei <[email protected]>
8ab8454
to
1ce95ea
Compare
"Link checker is failing" seems to be a probabilistic problem, It is caused by "Network error: Too Many Requests", I have no idea how to fix it. |
Description
Describe what this change achieves.
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.