-
Notifications
You must be signed in to change notification settings - Fork 109
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
CLIENT-2383 - Context arguments must accept a context list #550
base: stage
Are you sure you want to change the base?
Conversation
CLIENT-2383 Added support for context lists in Client.index_cdt_create() and Client.Query.where() Fixed the check for TestBaseClass.version not working corerctly upon initialization
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## stage #550 +/- ##
==========================================
+ Coverage 81.05% 81.25% +0.19%
==========================================
Files 98 99 +1
Lines 14833 14915 +82
==========================================
+ Hits 12023 12119 +96
+ Misses 2810 2796 -14 ☔ View full report in Codecov by Sentry. |
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.
query.where() is missing a test case.
@@ -2382,7 +2382,15 @@ as_status get_cdt_ctx(AerospikeClient *self, as_error *err, as_cdt_ctx *cdt_ctx, | |||
PyObject *op_dict, bool *ctx_in_use, | |||
as_static_pool *static_pool, int serializer_type) | |||
{ | |||
PyObject *py_ctx = PyDict_GetItemString(op_dict, CTX_KEY); |
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 think it might be better to modify Client.index_cdt_create() and Query.where() directly, instead of this helper function. Many other functions use this helper function, so this change might introduce a bug somewhere else in the client.
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.
You are right. I added these changes in the newest commit
@@ -120,7 +120,7 @@ def setup_class(cls): | |||
except e.IndexFoundError: | |||
pass | |||
|
|||
if (TestBaseClass.major_ver, TestBaseClass.minor_ver) >= (7, 0): | |||
if (int(TestBaseClass.major_ver), int(TestBaseClass.minor_ver)) >= (7, 0): |
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.
if (int(TestBaseClass.major_ver), int(TestBaseClass.minor_ver)) >= (7, 0): | |
if (TestBaseClass.major_ver), TestBaseClass.minor_ver) >= (7, 0): |
Isn't TestBaseClass.major_ver and minor_ver already initialized 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.
I was experiencing errors using the 7.0 server not creating the BLOB secondary indexes, and I used that debug code to test the value. The value for major_ver was printing 0. I'm not sure if it was a quirky local thing or something else, so we can remove this if needed. However, I don't think it harms anything, so I would suggest leaving it.
Added Documentation Added test cases for ctx dictionary legacy support
Ran precommit lint
CLIENT-2383
Added support for context lists in Client.index_cdt_create() and Client.Query.where() Fixed the check for TestBaseClass.version not working corerctly upon initialization