-
Notifications
You must be signed in to change notification settings - Fork 186
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 point in time rest api #191
Conversation
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
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.
Is there a way we could add tests for the same?
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Have added the tests. Thanks @Bukhtawar |
self.assert_url_called("POST", "/test-index/_search/point_in_time") | ||
|
||
def test_delete_one_point_in_time(self): | ||
self.client.delete_point_in_time(body={}) |
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.
we should not call delete with empty body . its delete all or delete with list of pit ids in empty.
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.
Sure, have updated it in the new revision. Thanks!
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
@@ -48,7 +48,7 @@ def format(session): | |||
session.install("black", "isort") | |||
|
|||
session.run("isort", "--profile=black", *SOURCE_FILES) | |||
session.run("black", "--target-version=py27", *SOURCE_FILES) | |||
session.run("black", "--target-version=py33", *SOURCE_FILES) |
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.
Fix for running lint formatter in nox, the py27 is not supported any more. We have update it in other places in the same file but this was left.
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
@VachaShah @axeoman please have a look |
@dblock please have a look. Thanks! |
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.
This is a new API we never shipped, right? Meaning we're not breaking any backwards compatibility here?
Document this in https://github.com/opensearch-project/opensearch-py/blob/main/GETTING_STARTED.md too please. Also #227
USER_GUIDE.md
Outdated
print('\n Point in time ID:') | ||
print(pit_id) | ||
|
||
# To list all point in time which are plive in the cluster |
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.
nit: *alive
USER_GUIDE.md
Outdated
|
||
# delete point in time | ||
body = { |
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.
nit: should we have better variable naming, applies to pit_id as well
USER_GUIDE.md
Outdated
@@ -119,7 +120,39 @@ response = client.indices.delete( | |||
print('\nDeleting index:') | |||
print(response) | |||
``` | |||
## Making API Calls | |||
|
|||
### Point in Time API calls |
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.
Should we give a brief about Point In Time here?
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.
Will update it with the official documentation link later.
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
@dblock please take a look. Thanks! |
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.
LGTM, care to rebase?
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
@Arpit-Bandejiya Needs a CHANGELOG entry as well, thx |
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
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.
Thank you @Arpit-Bandejiya! This LGTM
Please merge the PR @opensearch-project/clients |
Signed-off-by: Arpit Bandejiya abandeji@amazon.com
Description
Changes for point in time API
Related issue
opensearch-project/OpenSearch#3959
#227
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.