GeezerVison is showing github.com — Port Datastore onto GAPIC · Issue #2746 · googleapis/google-cloud-python
Port Datastore onto GAPIC #2746Labels api: datastoreIssues related to the Datastore API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DescriptionWhat
Port the gRPC code path for Datastore onto GAPIC. The package is available here.
Why
This is not a beta-blocker, since there already is gRPC code for Datastore, but it is preferred. Activitydhermes commented on Nov 17, 2016 @bjwatson Two questions:
- Why doesn't the new package depend on
google-gax>=0.15 (which has the new auth helpers)?
- Are we in a situation where some of the GAPIC packages depend on
0.13 <= google-gax < 0.14 while others depend on 0.14 <= google-gax < 0.15 (as this one does)?
bjwatson commented on Nov 17, 2016 @dhermes Only because @geigerj says that he needs to make some small updates to the GAPIC generator for it to be compatible with google-gax>=0.15. He might be able to get that done today, and then we can build all packages with the newer google-gax dependency.
I thought I would get this in your hands right away, rather than waiting for the necessary fixes to support the newer auth helpers. However, if you think it's a more efficient use of your time to wait, then we can do that. dhermes commented on Nov 18, 2016 @bjwatson Sorry I didn't notice this until now, but the current form of grpc-google-cloud-datastore-v1 can't run without gRPC. This means we can't get access to the protobufs without forcing grpc to be installed.
Right now we support Protobuf-over-HTTP and Protobuf-over-gRPC, so we need access to the protobuf classes in use cases where gRPC isn't available (i.e. App Engine).
The generated protobuf classes currently live in datastore._generated, which is how we import them. In order to support gRPC we have datastore_pb2.py and datastore_grpc_pb2.py in the _generated module
/cc @jonparrott bjwatson commented on Nov 19, 2016 dhermes commented on Nov 21, 2016 Yes it does do what I had in mind.
We had conditional checks in our setup.py, but @jonparrott discouraged that since it confuses wheel building. But maybe I am wrong on how I remember that.
AFAIK, even though grpcio is in our setup.py for packages like google-cloud-datastore, it doesn't stop from installing into a lib/ dir in an App Engine app. @jonparrott can confirm or deny or throw his hands up in sadness over packaging? theacodes commented on Nov 21, 2016 grpcio will indeed be vendored into lib for app engine and explode on import.
dhermes commented on Nov 21, 2016 geigerj commented on Nov 21, 2016 @bjwatson Is this a Datastore-specific hand-edit, or do we intend to provide these conditional imports across the gRPC packages we maintain? If it's the latter, we should figure out what the timeline for grpcio 1.1.0 is and whether we need to automate this in our tooling. dhermes commented on Nov 21, 2016 Reacted by Thomas Schultz bjwatson commented on Nov 30, 2016 @dhermes We're going to wait on porting Datastore to GAPIC until after the beta announcement. We discussed and we don't want to take any chances on destabilizing the google-cloud-python code for the four APIs. The only one that will go beta with GAPIC is Logging. dhermes commented on Dec 2, 2016 lukesneeringer commented on Mar 17, 2017 Sure, but it is a huge under-the-hood change, because those with GRPC support are suddenly using the GRPC transport now. dhermes commented on Mar 17, 2017 @lukesneeringer We already had the gRPC transport (for many releases), it was just the raw stub produced by the protoc plugin rather than the DatastoreClient which wraps that very same class. lukesneeringer commented on Mar 20, 2017
MetadataMetadataapi: datastoreIssues related to the Datastore API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DevelopmentNo branches or pull requestsIssue actions
|