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

Empty duplicated context in OutgoingInterceptor with Quarkus 3.7.0.CR1 #38350

Closed
lupogryph opened this issue Jan 23, 2024 · 7 comments · Fixed by #38355
Closed

Empty duplicated context in OutgoingInterceptor with Quarkus 3.7.0.CR1 #38350

lupogryph opened this issue Jan 23, 2024 · 7 comments · Fixed by #38355
Labels
area/arc Issue related to ARC (dependency injection) kind/bug Something isn't working
Milestone

Comments

@lupogryph
Copy link

Describe the bug

In quarkus 3.6.6, we can get informations from context in a OutgoingInterceptor using ContextLocals.get("key");
In quarkus 3.7.0.CR1, this context is empty

Expected behavior

ContextLocals::get return the context value in the OutgoingInterceptor implementation

Actual behavior

ContextLocals::get is empty in the OutgoingInterceptor implementation

How to Reproduce?

Use the reproducer here : https://github.com/lupogryph/quarkus-rep-1
And change quarkus.platform.version version in pom.xml.

With quarkus.platform.version 3.6.6, the test lupogryph.rep.quarkus.GreetingResourceTest#testHelloEndpoint pass
logs :

2024-01-23 16:12:41,893 INFO  [lup.rep.qua.GreetingResource] (executor-thread-1) hello ctx cid : 123
2024-01-23 16:12:41,901 INFO  [lup.rep.qua.MyOutgoingInterceptor] (executor-thread-1) ctx cid : 123
2024-01-23 16:12:44,523 INFO  [io.sma.rea.mes.kafka] (vert.x-eventloop-thread-3) SRMSG18256: Initialize record store for topic-partition 'words-0' at position -1.
2024-01-23 16:12:44,529 INFO  [lup.rep.qua.GreetingResource] (vert.x-eventloop-thread-3) words-in : io.smallrye.reactive.messaging.kafka.IncomingKafkaRecord@59ef8783

With quarkus.platform.version 3.7.0.CR1, this same test fails
logs :

2024-01-23 16:32:54,564 INFO  [lup.rep.qua.GreetingResource] (executor-thread-1) hello ctx cid : 123
2024-01-23 16:32:54,573 INFO  [lup.rep.qua.MyOutgoingInterceptor] (vert.x-eventloop-thread-1) ctx cid : null
2024-01-23 16:32:57,280 INFO  [io.sma.rea.mes.kafka] (vert.x-eventloop-thread-3) SRMSG18256: Initialize record store for topic-partition 'words-0' at position -1.
2024-01-23 16:32:57,287 INFO  [lup.rep.qua.GreetingResource] (vert.x-eventloop-thread-3) words-in : hello

java.lang.AssertionError: 1 expectation failed.
Response body doesn't match expectation.
Expected: is "123"
  Actual: null

Output of uname -a or ver

MINGW64_NT-10.0-19045 GRYPHON 3.1.6-340.x86_64 2020-07-09 14:33 UTC x86_64 Msys

Output of java -version

OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7)

Quarkus version or git rev

3.7.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

No response

@lupogryph lupogryph added the kind/bug Something isn't working label Jan 23, 2024
@gsmet gsmet added area/arc Issue related to ARC (dependency injection) and removed triage/needs-triage labels Jan 23, 2024
Copy link

quarkus-bot bot commented Jan 23, 2024

/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc)

@gsmet
Copy link
Member

gsmet commented Jan 23, 2024

/cc @cescoffier too

@cescoffier
Copy link
Member

@ozangunalp already fixed the bug and cut a release. So the fix should be included in Quarkus soon.

@gsmet
Copy link
Member

gsmet commented Jan 23, 2024

@cescoffier is the fix in the 3.7 branch?

@gsmet
Copy link
Member

gsmet commented Jan 23, 2024

@cescoffier I don't see any SmallRye Reactive Messaging update after 3.7.0.CR1 which seems affected per the report.

@ozangunalp could you chime in?

@ozangunalp
Copy link
Contributor

The fix has been merged and released today in Reactive Messaging 4.16.0.
I am opening the PR for Quarkus in a couple of minutes.

@gsmet
Copy link
Member

gsmet commented Jan 24, 2024

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants