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

gRPC request context: activate before all the interceptors are invoked #18804

Conversation

michalszynkiewicz
Copy link
Member

With this change, user's global interceptors can propagate data in the request context.

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

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

Looks good but I can't say that I understand all possible consequences of this change ;-)

@michalszynkiewicz
Copy link
Member Author

@mkouba gRPC server first fires global interceptor, than per-service interceptor.
Before this change, the interceptor that activates the request context was a per-service interceptor. This meant that when a user created an interceptor in their code, it was invoked before the request context was activated. So no values could be put to/read from the request context in such an interceptor.

With this change, the interceptor for request context is the first global interceptor. It will always be called first :)

@michalszynkiewicz michalszynkiewicz merged commit 178d501 into quarkusio:main Jul 19, 2021
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Jul 19, 2021
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.0.Final Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants