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

Make sure REST methods can be called without an active CDI context #22681

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

jmartisk
Copy link
Contributor

@jmartisk jmartisk commented Jan 6, 2022

Fixes #22662 - the problem is that if there's a gauge on a REST method and its GaugeAdapterImpl calls that REST method during scraping, it is called without an attached CDI and routing context, and CurrentVertxRequest.getCurrent() throws an exception in this case, rather than returns null.

@jmartisk jmartisk requested a review from ebullient January 6, 2022 09:11
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 6, 2022

/cc @ebullient

Copy link
Member

@ebullient ebullient left a comment

Choose a reason for hiding this comment

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

A few nits, but not required. ;)
Thank you (and Happy New Year)!

@jmartisk jmartisk merged commit 300d2a3 into quarkusio:main Jan 6, 2022
@jmartisk jmartisk deleted the main-issue-22662 branch January 6, 2022 13:29
@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Jan 6, 2022
@jmartisk
Copy link
Contributor Author

jmartisk commented Jan 6, 2022

@ebullient thanks for the review and happy new year to you too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gauges annotation are not showing up his value, on a resteasy endpoint
2 participants