-
Notifications
You must be signed in to change notification settings - Fork 67
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
NDB: Queries with != filter are broken in the last version. #962
Comments
Weird, there is a system test for this already:
|
What version of the emulator is being used? Try using the Datastore mode emulator |
@sorced-jim We used: Getting the same errors also with |
What's the Firestore emulator you are using? I tested with cloud-firestore-emulator 1.19.2 and the not equal tests pass. |
The current Cloud Firestore Emulator version is 1.19.2 |
What's the stack trace for the Firestore in Datasatore mode emulator? It should be different from the Cloud Datastore emulator. |
|
So there is no stack trace from the emulator with the != query? |
That's what we have on the failed test
|
I can reproduce this error with the Datastore emulator ( |
I am having the same problem with the new release 2.3.0 |
So will it no longer be possible to use the datastore emulator locally if we use '!=' operators? Only the firestore emulator in datastore-mode will work? |
The firestore emulator in datastore-mode doesn't currently support resetting the database. @sorced-jim Is there a path to continue to support the datastore emulator? |
Using the firestore emulator is not a replacement for the datastore emulator for us as well during testing. It also doesn't support any way to validate/test composite indexes, not even in firestore mode: firebase/firebase-tools#2027 |
I've run into this problem as well. Using the server-side For now, since we don't use |
...since the datastore emulator evidently doesn't support != query filters: googleapis/python-ndb#962
...since the datastore emulator evidently doesn't support != query filters: googleapis/python-ndb#962
...since the datastore emulator evidently doesn't support != query filters: googleapis/python-ndb#962
...since the datastore emulator evidently doesn't support != query filters: googleapis/python-ndb#962
@tlatin why don't you use the |
The feature was added to the firestore emulator in data-store mode per the linked issue in your comment (firebase/firebase-tools#6902). In general I wouldn't want to put the filesystem on the critical path of the hundred of tests. Also the previous datastore emulator supported the feature, so it's reasonable to request parity when being asked to migrate to a new solution. |
You are right that the feature should be there. But I am just suggesting a work around. And |
The bug has two work around and those are documented on https://github.com/googleapis/python-ndb/wiki/Upgrade-Notes . |
Environment:
OS: macOs Sonoma 14.2.1
Python 3.11
google-cloud-ndb==2.3.0
@sorced-jim Looks like queries with != filter were broken in #950 PR (Use server side != for queries).
The issue is that in model.py function
def ne(self, value):
"""FilterNode: Represents the
!=
comparison."""return self._comparison("!=", value)
parameter server_op=True was not passed to the query.FilterNode function threw the _comparison(self, op, value) function.
As a result queries with != filter are failing.
Steps to reproduce:
...
When running the test query.fetch() is failing with the error
google.api_core.exceptions.RetryError: Maximum number of 3 retries exceeded while calling <function make_call..rpc_call at 0x1032d99e0>, last exception: None
The text was updated successfully, but these errors were encountered: