-
Notifications
You must be signed in to change notification settings - Fork 61
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 spec for cluster stats metric and index_metric filter paths. #639
Add spec for cluster stats metric and index_metric filter paths. #639
Conversation
Changes AnalysisCommit SHA: 3ceb510 API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11826040133/artifacts/2184467167 API Coverage
|
4c500a7
to
d0602a5
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.
Looking good.
- Bump the SHA for a more recent build of 2.18 and 3.0 in https://github.com/opensearch-project/opensearch-api-specification/blob/main/.github/workflows/test-spec.yml#L45 until tests pass.
- Add to CHANGELOG.
d0602a5
to
590f18d
Compare
@SwethaGuptha Looks like the build has other problems (missing other plugins like SQL and ISM). This is a known and rather annoying problem, 3.x builds don't always have everything. You should chase what's broken in OpenSearch main distribution. I opened opensearch-project/opensearch-build#5130 to see what the infra team says about this (cc: @gaiksaya). |
Thanks @dblock for creating the issue. Did the tests work for v#3.0.0 previously? I see there are some failures from core OS as well. Also,I see the latest image available for v#3.0 is from eight days ago, do you know what cadence is followed for updating the version image? |
Yes, the failure on main right now came from #625 and will get fixed soon.
I think they try to build one daily, but it doesn't always work :( |
Will add more details to the issue but docker image is build using tarball. And all the distributions contains distribution manifest with all the information about a distribution and the components bundled in that distribution. |
It's just hard to tell from a distribution what the docker SHA is. |
@dblock Any inputs on the next steps to make progress on this PR? |
@SwethaGuptha yes, update the SHAs to the latest available for 2.18 and 3.0 and see if all tests pass - it has to pass 2.18, but you can mark tests as < 3.0 if that one doesn't pass, for now |
Now that 2.18 has been released this should be easier. |
afd68b1
to
975727e
Compare
Spec Test Coverage Analysis
|
@dblock Can you please help with the review? |
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.
Looks good, some cosmetic asks, please.
975727e
to
7103864
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.
Sorry to be annoying, some more small stuff flagged here.
8887c3c
to
60ba9ec
Compare
Signed-off-by: Swetha Guptha <[email protected]>
60ba9ec
to
3ceb510
Compare
Thanks for taking this on, merged! There's also node stats, do those have to mirror cluster stats?
|
@dblock
current const path = ['/_cluster/stats/', metric, '/', index_metric, '/nodes/', node_id].filter(c => c).join('').replace('//', '/'); which works fine for most situations EXCEPT for when no path params are provided since it will yield |
@nhtruong I think these are 2 separate APIs, one is |
I'm referring to these 4 operations: https://github.com/opensearch-project/opensearch-api-specification/pull/639/files#diff-c68dc8d4bd22aabd667fe0978fba9a121988d77ac766b1e2a5e94091603c0734R305-R366 It's no big deal. We just can't have that one-line solution 🥲 |
@nhtruong Yes, I think they should be totally different operations, no? would that not work? |
They are in the same
It's not hard to switch up the path selection logic to account for this edge case. |
Is this correct? |
Yes, the 4 operations I stated in #639 (comment) are in |
@nhtruong Trying to understand the problem here, was never a valid path even earlier. How is handling of two new paths causing a challenge in the Code Gen? |
What I am saying is that it is incorrect and that we have 2 separate APIs here, one which is |
Sorry I missed this earlier.
This PR wasn't the cause. Reading through this made me realize that the paths for this operation group will cause issue for the JS CodeGen specifically because of its peculiar strategy to build the path. And this is the only group with paths like these. We also have other edge cases where the server accepts both
Another path edge case that you're already aware of is the |
Description
Adding specs for path
/_cluster/stats/{metric}/nodes/{nodeId}
and/_cluster/stats/{metric}/{index_metric}/nodes/{nodeId}
in cluster/stats API. With opensearch-project/OpenSearch#15938, the cluster/stats API will have filtering support that will allow the clients to fetch only specific metrics from cluster/stats instead of all metrics.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.