You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BigTable: row.commit throwing _Rendezvous exception instead of ServiceUnavailable #4656
IIUC, the Bigtable client doesn't actually use GAPIC.
That's correct. Bigtable was the very first package to use protoc with the grpc extension and we still have a Makefile to build the google.cloud.bigtable._generated package.
This very much should be retired in favor of the "modern" autogen infrastructure.
Thanks. Just to clarify, after the regeneration we would get a mapping of the Rendezvous exception to a ServiceUnavailable exception? Curious to know how this code generation works so that the code in api_core/google/api_core/exceptions.py for ServiceUnavailable is used.
Just to clarify, after the regeneration we would get a mapping of the Rendezvous exception to a ServiceUnavailable exception?
Yes
Curious to know how this code generation works so that the code in api_core/google/api_core/exceptions.py for ServiceUnavailable is used.
The generator generates wrappers for the underlying grpc client (stub in grpc terminology). One of the wrappers applied to all RPC methods is google.api_core.grpc_helpers.wrap_errors which handles re-mapping grpc.RpcErrors to appropriate exception classes. wrap_errors is applied to RPC methods by google.api_core.gapic_v1.method.wrap_method which is called by the generated code (example).
Activity
dhermes commentedon Jan 2, 2018
@zakons In order for the "new" exceptions to be in place, the Bigtable gRPC / GAPIC surface will need to be regenerated.
@lukesneeringer Can we make this happen?
sduskis commentedon Jan 2, 2018
@dhermes: IIUC, the Bigtable client doesn't actually use GAPIC.
FWIW, I'm all for regenerating the protobuf and gRPC artifacts. I'd also be happy if we can migrate to GAPIC.
dhermes commentedon Jan 2, 2018
That's correct. Bigtable was the very first package to use
protocwith thegrpcextension and we still have aMakefileto build thegoogle.cloud.bigtable._generatedpackage.This very much should be retired in favor of the "modern" autogen infrastructure.
zakons commentedon Jan 3, 2018
Thanks. Just to clarify, after the regeneration we would get a mapping of the Rendezvous exception to a ServiceUnavailable exception? Curious to know how this code generation works so that the code in api_core/google/api_core/exceptions.py for ServiceUnavailable is used.
theacodes commentedon Jan 3, 2018
Yes
The generator generates wrappers for the underlying grpc client (stub in grpc terminology). One of the wrappers applied to all RPC methods is
google.api_core.grpc_helpers.wrap_errorswhich handles re-mappinggrpc.RpcErrorsto appropriate exception classes.wrap_errorsis applied to RPC methods bygoogle.api_core.gapic_v1.method.wrap_methodwhich is called by the generated code (example).tseaver commentedon Mar 16, 2018
@jonparrott I'm not sure if it is you or @lukesneeringer who needs to do the non-re-generation of the GAPIC source from the protos.
theacodes commentedon May 1, 2018
This should be all covered by #5178