-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
gRPC Services error when running mutiny API and default gRPC API #44326
Comments
/cc @alesj (grpc), @cescoffier (grpc,mutiny), @jponge (mutiny) |
I thin it's expected. You cannot have 2 implementations of the same service. Now we should fails the build in this case. |
I agree that failing the build or providing a clear error message indicating the conflict would be beneficial. This would help others like me to identify and resolve the issue quickly. |
Totally agree! @alesj WDYT? |
I already get this when running this with "mvn clean quarkus:dev"
But I guess this depends if the reflection service is enabled ... |
@alesj - Could you please add what you have on your application.properties |
@alesj - I have 2 classes annotated with @GrpcService @GrpcService ** Both ways build fine: With and without data in application.properties |
|
It's not Arc, it's the GrpcServerProcessor::processGeneratedBeans
|
@cescoffier so the question is, should this fail or at least a warning? |
I would say fail. Or do i miss a use case? Only one service will be reachable and we don't know which one :-) |
Agreed, let's ensure it fails with a clear and reasonable error message :) |
The non-bean will be reachable currently.
(the one that extends gRPC generated classes)
…On Wed, 27 Nov 2024 at 16:52, Clement Escoffier ***@***.***> wrote:
I would say fail. Or do i miss a use case? Only one service will be
reachable and we don't know which one :-)
—
Reply to this email directly, view it on GitHub
<#44326 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRA6F3RDMG5BDI2ETCW432CXTDNAVCNFSM6AAAAABRGYXH3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGIZDINBRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for sharing your code @alesj . I was able to download and test it in my environment. Here are a couple of comments: @OverRide You will be able to compile without any issues. I hope this helps! Let me know if you need anything else. |
Nah, that is not the right code -- I haven't yet made the right fix. |
Describe the bug
When using the same .proto file for both a class implementing the Mutiny API and another class using the default gRPC API in Quarkus, only the service implemented with the default API appears in the gRPC services list.
The service using the Mutiny API gets removed and is not available. However, if I create a separate .proto file and use it for one of the implementations, both services show up in the Dev UI under gRPC services.
Expected behavior
I expected both services to be available for connection and visible in the Dev UI under gRPC services. It should not matter if they are using the same .proto file.
Actual behavior
Using the grpc-plain-text-quickstart, I created a class using the default api example from the documentation. When testing both the default API and mutiny API, I realized that one endpoint was missing. The default API displays in the gRPC · Services, however the mutiny api got removed. I found it in the ARC - removed components (dev-ui) and they are also not available when I call it.
How to Reproduce?
Get the grpc-plain-test-quickstart
Add a class to io.quarkus.grpc.examples.hello;
use the extends GreeterImplBase
insert the code
@OverRide
public void sayHello(HelloRequest request, StreamObserver responseObserver) {
String name = request.getName();
HelloReply reply = HelloReply.newBuilder().setMessage("Hello " +
name).build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}
compile and run quarkus:dev
Output of
uname -a
orver
Linux L91PLPG3 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "22.0.1" 2024-04-16
Quarkus version or git rev
3.16.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Additional information
No response
The text was updated successfully, but these errors were encountered: