Better support for common classes and resource definitions
dazuma opened this issue · 1 comments
dazuma commented
This manifests as two possibly related issues:
- Core resource definitions such as
cloudresourcemanager.googleapis.com/Project
andlocations.googleapis.com/Location
are defined ingoogle/cloud/common_resources.proto
. This file is not present in the common protos provided as part of the generator. Hence:- Synth scripts must add it explicitly.
- This, in turn, causes an unreferenced
lib/google/cloud/common_resources_pb.rb
file to get generated by the ruby protoc plugin.
It appears that cross-reference links to common protos (such asgoogle.longrunning.Operation
) are not getting generated. (This appears, for example, in the docs forgoogle.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations
.) It's possible this would be alleviated if we addedgoogle.longrunning.operations.proto
explicitly in the synth script but that would then cause the issues in (1) above.
Update: After looking at the particular google.longrunning.Operation
failure, I think it's being caused by a different issue. However, the google/cloud/common_resources.proto
issue is still relevant.
We need to handle these "common" resources better than we are.
dazuma commented
I think we've gotten about as good as we're going to get on this one. We're now removing common_resources_pb.rb
during postprocessing. But it's probably the right thing for synth scripts to include it explicitly for now (at least until the bazel work tells us to do something different.) Closing.