-
Notifications
You must be signed in to change notification settings - Fork 3.9k
core: copy the SchemaDescriptor when rebuilding descriptor #6851
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
Conversation
|
LGTM |
@@ -187,13 +187,15 @@ public InputStream parse(final InputStream stream) { | |||
wrappedMethods.add(wrapMethod(definition, wrappedMethodDescriptor)); |
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.
wrappedMethods
is never used, and this is causing the CI error.
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.
Look like the earlier for loop should not have been deleted and should occur after serviceBuilder
is created (just like before).
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.
Sorry, not sure what happened--some patching problem on my end. Should look something like this:
// Build the new service descriptor
final ServiceDescriptor.Builder serviceDescriptorBuilder =
ServiceDescriptor.newBuilder(serviceDef.getServiceDescriptor().getName())
.setSchemaDescriptor(serviceDef.getServiceDescriptor().getSchemaDescriptor());
// Create the new service definition.
final ServerServiceDefinition.Builder serviceBuilder =
ServerServiceDefinition.builder(serviceDescriptorBuilder.build());
for (ServerMethodDefinition<?, ?> definition : wrappedMethods) {
serviceBuilder.addMethod(definition);
}
return serviceBuilder.build();
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.
Applied fix.
useMarshalledMessages works by duplicating a ServerServiceDefinition while replacing just the marshallers. It currently does not copy over the SchemaDescriptors, which breaks at least the ProtoReflectionService.
useMarshalledMessages works by duplicating a ServerServiceDefinition while replacing just the marshallers. It currently does not copy over the SchemaDescriptors, which breaks at least the ProtoReflectionService.
useMarshalledMessages works by duplicating a ServerServiceDefinition while replacing just the marshallers. It currently does not copy over the SchemaDescriptors, which breaks at least the ProtoReflectionService.