-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add support for duplicated context in the gRPC clients #23731
Add support for duplicated context in the gRPC clients #23731
Conversation
Failing Jobs - Building 13e5e3c
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
|
@@ -35,6 +41,12 @@ | |||
public void test() { | |||
String neo = service.invoke("neo-mutiny"); | |||
assertThat(neo).matches("Hello neo-mutiny"); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to also test if client interceptors are invoked with the same duplicated context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test checks that it does call you on the same duplicated context. Not the interceptor, but the actual items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems we didn't understand each other :)
OTOH, it's unlikely interceptor invocation would hijack context somehow, so maybe we're good without a test I wrote a bout
super.start(new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(responseListener) { | ||
|
||
@Override | ||
public void onReady() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under impression that we want to invoke client stuff always with duplicated context but we stick to only propagating the context, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
The problem is that if we start using a duplicated context, we cannot block anymore, which would break the blocking clients. So I just propagate if there is a context.
.map(HelloReply::getMessage) | ||
.invoke(() -> assertThat(Vertx.currentContext().getDelegate()) | ||
.isNotInstanceOf(EventLoopContext.class).isNotInstanceOf(WorkerContext.class) | ||
.isEqualTo(duplicate)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's where we verify we are called on the same duplicated context
super.start(new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(responseListener) { | ||
|
||
@Override | ||
public void onReady() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
The problem is that if we start using a duplicated context, we cannot block anymore, which would break the blocking clients. So I just propagate if there is a context.
No description provided.