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

V1reflectionservice #11237

Merged
merged 18 commits into from
Jul 19, 2024
Merged

Conversation

kannanjgithub
Copy link
Contributor

Converted existing ProtoReflectionService for v1.alpha to handle v1 protos and renamed it to ProtoReflectionServiceV1, and created a new ProtoReflectionService for v1.alpha that uses the V1 service's ServerServiceDefinition and modifies the names and proto descriptors for service and method.

Issue #6724.

Changes still in progress on the proto field mapping.
…rverServiceDefinition constructed from that of the v1 service but with the service and method names and proto descriptors modified.
…rverServiceDefinition constructed from that of the v1 service but with the service and method names and proto descriptors modified.

Issue grpc#6724.

Squashed commit of the following:

commit f1f2da7
Author: Kannan J <[email protected]>
Date:   Tue May 28 10:24:32 2024 +0000

    Some nitty changes.

commit 34f81e5
Author: Kannan J <[email protected]>
Date:   Tue May 28 10:09:49 2024 +0000

    Create ProtoReflectionService for the v1alpha proto by producing a ServerServiceDefinition constructed from that of the v1 service but with the service and method names and proto descriptors modified.

commit e99a8da
Author: Kannan J <[email protected]>
Date:   Fri May 24 11:20:28 2024 +0000

    Create V1 alpha service wrapping underlying V1 service, by modifying the ServerServiceDefinition.

commit b2bb9e1
Author: Kannan J <[email protected]>
Date:   Fri May 24 07:14:42 2024 +0000

    Changes to allow unit testing.

commit a002bc2
Author: Kannan J <[email protected]>
Date:   Wed May 22 11:53:27 2024 +0000

    Issue grpc#6724 to create a V1 reflection service.
    Changes still in progress on the proto field mapping.
…ectionservice

# Conflicts:
#	services/src/main/java/io/grpc/protobuf/services/ProtoReflectionService.java
* extension.
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
public final class ProtoReflectionServiceV1 extends ServerReflectionGrpc.ServerReflectionImplBase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up PR, we'll want to remove the "extends ServerReflectionImplBase" from the public API surface. Yes, nobody can use it, but let's still not expose it. That is better as a follow-up, so that git will see the move/copy and then separately the changes made to the service.

/grpc-java/services/src/main/java/io/grpc/protobuf/services/ProtoReflectionService.java:76: warning: [unchecked] unchecked method invocation: method addMethod in class Builder is applied to given types
        .addMethod(methodDescriptorV1Alpha, createServerCallHandler(serverServiceDefinitionV1))
                  ^
  required: MethodDescriptor,ServerCallHandler
  found: MethodDescriptor,ServerCallHandler
  where ReqT,RespT are type-variables:
    ReqT extends Object declared in method addMethod(MethodDescriptor,ServerCallHandler)
    RespT extends Object declared in method addMethod(MethodDescriptor,ServerCallHandler)
@kannanjgithub kannanjgithub merged commit 0aa976c into grpc:master Jul 19, 2024
13 checks passed
@kannanjgithub kannanjgithub deleted the v1reflectionservice branch July 19, 2024 13:57
larry-safran pushed a commit to larry-safran/grpc-java that referenced this pull request Aug 13, 2024
V1 version of the proto reflection service, as the v1.alpha service has been deprecated.

* Create V1 alpha service wrapping underlying V1 service, by modifying the ServerServiceDefinition.

* Create ProtoReflectionService for the v1alpha proto by producing a ServerServiceDefinition constructed from that of the v1 service but with the service and method names and proto descriptors modified.

Issue grpc#6724.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants