-
Notifications
You must be signed in to change notification settings - Fork 68
fix: add per-service api_version to gapic_metadata #3984
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
Changes from all commits
685ccfd
472ab57
40fe026
c5f8d8d
2c4de61
db2674f
78c8241
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1898,12 +1898,15 @@ private static void updateGapicMetadata( | |
| serviceClientProtoBuilder.putRpcs(rpcName, methodList); | ||
| } | ||
|
|
||
| metadataBuilder = | ||
| metadataBuilder.putServices( | ||
| service.name(), | ||
| GapicMetadata.ServiceForTransport.newBuilder() | ||
| .putClients("grpc", serviceClientProtoBuilder.build()) | ||
| .build()); | ||
| GapicMetadata.ServiceForTransport.Builder grpcServiceClient = | ||
| GapicMetadata.ServiceForTransport.newBuilder() | ||
| .putClients("grpc", serviceClientProtoBuilder.build()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @blakeli0 Do you know why if there is a reason we don't have a "rest" client here as well?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was probably a miss when REGAPIC was implemented.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
ATM, i have no concerns. In my survey of other languages, Java is not the only one. We've gone X years without publishing that metadata with no complaints, so I'm not sure it's all that urgent. I can file an idea bug to capture my findings across languages and at least document that there is a gap in the metadata for |
||
|
|
||
| if (service.hasApiVersion()) { | ||
| grpcServiceClient.setApiVersion(service.apiVersion()); | ||
| } | ||
|
|
||
| metadataBuilder = metadataBuilder.putServices(service.name(), grpcServiceClient.build()); | ||
| context.updateGapicMetadata(metadataBuilder.build()); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,7 +114,8 @@ | |
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "apiVersion": "v1_20240408" | ||
| }, | ||
| "Identity": { | ||
| "clients": { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably a tech debt on our end.
gapic_metadata.protoshould be updated automatically along side other "config protos" like service.proto.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agreed. I will leave this here for now, but LMK if you want me to file a tracking issue with some details.