-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Firestore: implement set such that it passes conformance testing #6307
Comments
I'm doing this work in https://github.com/mcdonc/google-cloud-python/tree/6307-implement-set-conformance |
We'll merge the https://github.com/mcdonc/google-cloud-python/tree/6307-implement-set-conformance branch back into Tres' 6290-firestore-refactor_conformance_tests branch represented by #6291 once it has a positive review. |
The https://github.com/mcdonc/google-cloud-python/tree/6307-implement-set-conformance branch is slightly better now; 22 set-related failures as opposed to 30. However, save a couple, the remainder of the conformance failures are related to features that are just not implemented currently in the Python client. In particular, the conformance tests assert behavior related to several sentinel values that may be used in the request json payload: "ArrayRemove", "ArrayUnion", and "Delete". As far as I can tell this is just bridge-out; these strings in an appropriate context appear nowhere in the current source. Thus, if we want to pass the conformance tests, this task is no longer really about "fixing conformance", it's about extending the client in fundamental ways. |
We decided to blacklist the tests that are related to ArrayRemove, ArrayUnion and Delete transforms. We will reenable once we have a plan for implementing those features. After the blacklisting, the branch currently has
stray update field in write protobuf. trying to make it do something different here breaks other tests, just haven't been able to pin the right juke down, probably should look more closely at the go and node impls. Note that there is a set-st-alone that passes, but it wants the update field, and removing it in the various impls causes the set tests to start to fail.
stray update field and update_mask field in write protobuf. similar to 2. Now that I look more closely at the failure mode of set-st-merge-nonleaf-alone, I think it's actually the same failure mode as 1 (parent of nested field path should be included in update mask). update-st-dot.textproto has the docstring: "Like other uses of ServerTimestamp, the data is pruned and the field does not appear in the update mask, because it is in the transform. In this case an update operation is produced just to hold the precondition." but no update operation is present in the expected payload, only a transform, so it's difficult to determine what the intent is here. |
This clowny diff fixes set-st-merge-nonleaf-alone.textproto but it's clearly just working around the problem and there is some more fundamental way to fix it.
|
@schmidt-sebastian, @jba, @mcdonc I have converted the After rebasing to master it seems that there are more tests that need to be done to pass the conformance tests than before and it seems like I'm about 15 tests behind @MCONC even after taking away the |
@chemelnucfin the recent comments above refer to https://github.com/mcdonc/google-cloud-python/tree/6307-implement-set-conformance which evolved to not have a MergeOption class, instead using the master pattern of merge= to set. Its unclear where you branched from but you may want to base your work on that branch as it has all but 4 tests passing. I received some of your code for apirepr parsing in there too. Edit: ah, it seems you must have looked at that branch from the "15 tests behind mcdonc" comment, I just got confused when you mentioned you "converted the merge from an options class" because that branch doesn't have a merge options class anymore. So I'm not sure where you started from, but it doesn't appear to be the latest revision. |
@mcdonc I've merged your https://github.com/mcdonc/google-cloud-python/tree/6307-implement-set-conformance branch into https://github.com/googleapis/google-cloud-python/tree/6290-firestore-refactor_conformance_tests, and will work on reducing the remaining 4 failures. |
Via #6291. |
No master branch version of firestore has ever passed the class of conformance tests for the "set" command, which means someone (me) needs to deeply understand the Firestore spec and either make changes to the current impl to make those conformance tests pass or reimplement.
#6290 (comment)
The text was updated successfully, but these errors were encountered: