-
Notifications
You must be signed in to change notification settings - Fork 183
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 "ingest" client APIs into the existing module #513
Integrated generated "ingest" client APIs into the existing module #513
Conversation
423362e
to
3eb8748
Compare
Codecov Report
@@ Coverage Diff @@
## main #513 +/- ##
=======================================
Coverage 70.86% 70.87%
=======================================
Files 83 83
Lines 7796 7790 -6
=======================================
- Hits 5525 5521 -4
+ Misses 2271 2269 -2
|
from .utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params | ||
|
||
|
||
class IngestClient(NamespacedClient): | ||
@query_params("master_timeout", "cluster_manager_timeout", "summary") | ||
@query_params("cluster_manager_timeout", "master_timeout") |
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 imagine this is correct?
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.
yes. #513 (comment)
opensearchpy/_async/client/ingest.py
Outdated
:arg timeout: Explicit operation timeout | ||
:arg cluster_manager_timeout: Operation timeout for connection | ||
to cluster-manager node. | ||
:arg master_timeout: Operation timeout for connection to master |
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.
May be we could keep the comments for master_timeout that it is deprecated?
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.
@VachaShah, Do you mean include deprecation msg in the param description using generator.
something like
:arg master_timeout (Deprecated: deprecation message from here ): Explicit operation timeout for connection
to master node
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! It would be nice to have it in the description of the param.
3eb8748
to
07db4ae
Compare
…uring alignment with the server and maintaining backward compatibility Signed-off-by: saimedhi <saimedhi@amazon.com>
07db4ae
to
8945885
Compare
…uring alignment with the server and maintaining backward compatibility (opensearch-project#513) Signed-off-by: saimedhi <saimedhi@amazon.com> Signed-off-by: roma2023 <romasaparhan19@gmail.com>
Description
Integrated generated ingest client APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility
Issues Resolved
Related to #477
Testing the "summary" parameter in the "get_pipeline" API resulted in an error indicating that the parameter is unrecognized (Implies generated "get_pipeline" is correct)
{
"acknowledged": true
}
get https://localhost:9200/_ingest/pipeline/pipelineid123?summary=true
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "request [/_ingest/pipeline/pipelineid123] contains unrecognized parameter: [summary]"
}
],
"type": "illegal_argument_exception",
"reason": "request [/_ingest/pipeline/pipelineid123] contains unrecognized parameter: [summary]"
},
"status": 400
}
Ingest.geo_ip_stats should be removed from client(Generator is correct)
client.ingest.geo_ip_stats()
RequestError: RequestError(400, 'no handler found for uri [/_ingest/geoip/stats] and method [GET]', 'no handler found for uri [/_ingest/geoip/stats] and method [GET]')
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.