Skip to content
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

Fix MissingRequiredPropertyException on node stats response #745

Merged
merged 7 commits into from
Dec 1, 2023

Conversation

Bfindlay
Copy link
Contributor

Description

Describe what this change achieves.
All of the properties in the stats response were marked as required. However as per opensearch API spec, the request can be modified to return only what is requested and therefore if you select a stat such as "fs" the deserialization of the response will fail as the "required" properties are not available.

This can be seen in the OpenSearch library that these are nullable in the repsonse https://github.com/opensearch-project/OpenSearch/blob/5bb6caec906f9e89d330332ebb74789571409eb1/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java#L78

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].
#740

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.

Signed-off-by: bfindlay <bfindlay@acm.org>
Signed-off-by: bfindlay <bfindlay@acm.org>
Signed-off-by: bfindlay <bfindlay@acm.org>
Signed-off-by: bfindlay <bfindlay@acm.org>
Signed-off-by: bfindlay <bfindlay@acm.org>
reta
reta previously approved these changes Nov 30, 2023
dblock
dblock previously approved these changes Nov 30, 2023
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: bfindlay <bfindlay@acm.org>
@Bfindlay Bfindlay dismissed stale reviews from dblock and reta via 6a72287 December 1, 2023 00:31
Signed-off-by: bfindlay <bfindlay@acm.org>
@reta reta merged commit 261cab4 into opensearch-project:main Dec 1, 2023
44 checks passed
@reta reta added the backport 2.x Backport to 2.x branch label Dec 1, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 1, 2023
* fix stats null issues

Signed-off-by: bfindlay <bfindlay@acm.org>

* update changelog

Signed-off-by: bfindlay <bfindlay@acm.org>

* updated changelog

Signed-off-by: bfindlay <bfindlay@acm.org>

* use existing nodes itest

Signed-off-by: bfindlay <bfindlay@acm.org>

* fix test typo

Signed-off-by: bfindlay <bfindlay@acm.org>

* update itests

Signed-off-by: bfindlay <bfindlay@acm.org>

* spotless apply

Signed-off-by: bfindlay <bfindlay@acm.org>

---------

Signed-off-by: bfindlay <bfindlay@acm.org>
(cherry picked from commit 261cab4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Dec 1, 2023
)

* fix stats null issues



* update changelog



* updated changelog



* use existing nodes itest



* fix test typo



* update itests



* spotless apply



---------


(cherry picked from commit 261cab4)

Signed-off-by: bfindlay <bfindlay@acm.org>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@BrendonFaleiro BrendonFaleiro mentioned this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants