-
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
Reorder Grpc server interceptors to apply exception handler correctly #39904
Conversation
@alesj I am not sure if this breaks anything. Please take a look |
This comment has been minimized.
This comment has been minimized.
@ozangunalp so this looks like we had the interceptors order wrong all along? |
The tests seem to pass locally |
Yes, the blocking interceptor schedules server listener calls on other threads so there wasn't any other way to apply the exception handling. The solution is to apply the blocking interceptor before the exception handling, so when an exception is thrown by the server method it gets handled by the handler and we close the server call by setting the status. Where we need to pay attention in this change is all the other places I moved the list of interceptors. Sure tests pass but I am not sure whether we need to test something else. |
Yes, it may break users interceptor, but I think this change makes a lot of sense. |
I am squashing it and it's good to go then |
…request context interceptor but before exception handlers Fixes quarkusio#39602
Break them in what way? |
Status for workflow
|
Expecting to get called in event loop but getting called on worker thread. But at least the context will be preserved. |
Don't we / you control this with the @Blocking / @RunOnVirtualThread ... ? Or this has changed now by default, and if someone is depending on this impl-details, it will break the current interceptors? |
It depends on the order in which interceptors are applied.
I don't think it is a big deal as interceptors are still applied by priority. |
Fixes #39602
To squash once reviewed