Skip to content
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

Regenerate Bigtable V2 protos #1918

Closed
tseaver opened this issue Jun 27, 2016 · 4 comments
Closed

Regenerate Bigtable V2 protos #1918

tseaver opened this issue Jun 27, 2016 · 4 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API.

Comments

@tseaver
Copy link
Contributor

tseaver commented Jun 27, 2016

(after the version landed in #1903).

@sduskis reports:

There were some relatively minor changes in the v2 protos. Mostly the changes were in the comments. There were minor changes to rename fields from "name" to "parent" to better reflect the meaning of some of the proto elements. The latest version of the protos can be found in the official
google api repository at https://github.com/googleapis/googleapis/tree/master/google/bigtable.

@tseaver tseaver added the api: bigtable Issues related to the Bigtable API. label Jun 27, 2016
@tseaver tseaver self-assigned this Jun 27, 2016
@tseaver
Copy link
Contributor Author

tseaver commented Jun 28, 2016

My setup for protoc v3 and the grpc_python_plugin is broken: the gRPC portion fails to generate with a "Missing input file" error.

I scraped the needed gRPC stub code from #1895, but we really need to get #1384 or #1482 nailed down.

@tseaver
Copy link
Contributor Author

tseaver commented Jun 28, 2016

Looks like grpcio-tools >= 0.14.0 can carry our water:

$ python2.7 -m virtualenv /tmp/grpc_python
$ /tmp/grpc_python/bin/pip install grcpio grpcio-tools
$ git clone https://github.com/google/googleapis/
$ mkdir generated
$ /tmp/grpc_python/bin/python -m grpc.tools.protoc \
  --proto_path=googleapis --python_out=xxx --grpc_python_out=xxx \
  googleapis/google/bigtable/v2/bigtable.proto

@tseaver
Copy link
Contributor Author

tseaver commented Jun 28, 2016

Via #1925.

@tseaver tseaver closed this as completed Jun 28, 2016
@tseaver
Copy link
Contributor Author

tseaver commented Jun 28, 2016

gRPC generation for $(GOOGLEAPIS)/google/longrunning/operations.proto is brokey:

  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/bigtable/client.py", line 344, in start
    self._operations_stub_internal = self._make_operations_stub()
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/bigtable/client.py", line 307, in _make_operations_stub
    OPERATIONS_API_HOST_V2, OPERATIONS_API_PORT_V2)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/bigtable/client.py", line 467, in _make_stub
    return stub_factory(channel)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/bigtable/_generated_v2/operations_grpc_pb2.py", line 238, in beta_create_Operations_stub
    ('google.longrunning.Operations', 'CancelOperation'): CancelOperationRequest.SerializeToString,
NameError: global name 'CancelOperationRequest' is not defined

Adding the imports by hand to push forward on system tests:

--- a/gcloud/bigtable/_generated_v2/operations_grpc_pb2.py
+++ b/gcloud/bigtable/_generated_v2/operations_grpc_pb2.py
@@ -1,4 +1,12 @@
-
+from google.longrunning.operations_pb2 import (
+    CancelOperationRequest,
+    DeleteOperationRequest,
+    GetOperationRequest,
+    ListOperationsRequest,
+    ListOperationsResponse,
+    Operation,
+    google_dot_protobuf_dot_empty__pb2,
+)
 from grpc.beta import implementations as beta_implementations
 from grpc.beta import interfaces as beta_interfaces
 from grpc.framework.common import cardinality

@tseaver tseaver reopened this Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API.
Projects
None yet
Development

No branches or pull requests

1 participant