-
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 client interceptors are not registered when injected via constructor #44932
Comments
/cc @alesj (grpc), @cescoffier (grpc) |
cc @mkouba |
It's very likely a regression caused by d34eb5a#diff-c176df2cb8a1cd56ae30ff243a7c6f817604c94f4b755ff424a79bdf0fd6b798. The code filters the qualifiers by annotation target but for nested annotations (which is the case for repeatable annotations used in a container) it's CC @manovotn |
@RoMiRoSSaN in your reproducer, I don't see the
Yes, after some digging it seems that the code here is a leftover of the commit you posted that should have been removed with #40841. We should now be able to just |
@manovotn Hi. I have redesigned the reproducer for better understanding.
Reproducer: grpc-demo.zip |
In any case, we should add an alternative to ClientInterceptorRegistrationTest with constructor injection. |
Yeah, just copy/paste the test and should be fine.
|
Ah, I see, I misunderstood it originally, thanks for clarification @RoMiRoSSaN :) The fix I mentioned above works for your reproducer, so I'll push that along with a test momentarily. |
Describe the bug
Since version 3.9 client interceptors are not registered when injected via constructor, if there are more than 1 of interceptor.
If there is one, then it registers successfully.
When inject by field - all works.
How I understand, there were changes in InjectionPointInfo or somewhere else that affected this. If more than 1 interceptor is listed, they are not included in the qualifiers. As a result, not a single interceptor is registered.
https://github.com/quarkusio/quarkus/blob/main/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcClientProcessor.java#L433
Before version 3.9 it works normal. I checked from 3.9 to 3.17, and this bug containing.
Expected behavior
Actual behavior
How to Reproduce?
Reproducer: grpc-demo.zip
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: