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

Integrated generated 'nodes' client APIs into the existing module #514

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

saimedhi
Copy link
Collaborator

Description

Integrated generated 'nodes' client APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility

Issues Resolved

Related to #477

Testing the "include_unloaded_segments" parameter in the "stats" API resulted in an error indicating that the parameter is unrecognized (Implies generated "stats" API is correct)

get https://localhost:9200/_nodes/stats?include_unloaded_segments=true

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "request [/_nodes/stats] contains unrecognized parameter: [include_unloaded_segments]"
}
],
"type": "illegal_argument_exception",
"reason": "request [/_nodes/stats] contains unrecognized parameter: [include_unloaded_segments]"
},
"status": 400
}

Before giving your approval, kindly double-check.

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.

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #514 (60fb645) into main (70db37a) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #514   +/-   ##
=======================================
  Coverage   70.87%   70.87%           
=======================================
  Files          83       83           
  Lines        7790     7790           
=======================================
  Hits         5521     5521           
  Misses       2269     2269           
Files Coverage Δ
opensearchpy/_async/client/nodes.py 63.15% <ø> (ø)
opensearchpy/client/nodes.py 63.15% <ø> (ø)

@saimedhi saimedhi marked this pull request as draft September 28, 2023 20:47
@saimedhi saimedhi force-pushed the merge/nodes_client branch 2 times, most recently from 5b9493a to 747adfd Compare October 2, 2023 19:52
…suring alignment with the server and maintaining backward compatibility

Signed-off-by: saimedhi <saimedhi@amazon.com>
@saimedhi saimedhi marked this pull request as ready for review October 3, 2023 00:25
Signed-off-by: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com>
dblock
dblock previously approved these changes Oct 3, 2023
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
@@ -79,7 +88,6 @@ class NodesClient(NamespacedClient):
fields: Optional[Any] = ...,
groups: Optional[Any] = ...,
include_segment_file_sizes: Optional[Any] = ...,
include_unloaded_segments: Optional[Any] = ...,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we breaking users by removing this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are not breaking users because the parameter is throwing error


{
"type": "illegal_argument_exception",
"reason": "request [/_nodes/stats] contains unrecognized parameter: [include_unloaded_segments]"
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@saimedhi saimedhi Oct 3, 2023

Choose a reason for hiding this comment

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

I'm not certain, Vacha. I'm not very familiar with the OpenSearch server code. Do we need to examine this file or action instead of the above file?

https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java#L63

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah you are absolutely right! For nodes stats it does not exist.

@VachaShah VachaShah merged commit 80b9681 into opensearch-project:main Oct 3, 2023
51 checks passed
@saimedhi saimedhi deleted the merge/nodes_client branch October 4, 2023 22:17
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
…suring alignment with the server and maintaining backward compatibility (opensearch-project#514)

Signed-off-by: saimedhi <saimedhi@amazon.com>
Signed-off-by: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com>
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Signed-off-by: roma2023 <romasaparhan19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants