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

Fix Fault Tolerance in combination with RestClient Reactive #19537

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Aug 20, 2021

The fault tolerance extension loads bean classes from the deployment
classloader during fault tolerance discovery. The classes, as well as
discovered fault tolerance annotations, are transferred to runtime,
where SmallRye Fault Tolerance applies runtime configuration.

This works fine, unless one of the bean classes is generated
by another Quarkus extension. These generated classes are stored
in memory and the deployment classloader doesn't know about them.
Naturally, loading the class fails and aborts the build.

The specific problem found was in combination of Fault Tolerance
and RestClient Reactive. This commit makes sure that the RestClient
generated classes are known to the deployment classloader, but
it seems fairly obvious that this is a hacky one-off fix and
not a proper solution. I still find it worth sharing :-)

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 20, 2021

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@Ladicek
Copy link
Contributor Author

Ladicek commented Aug 20, 2021

Draft, because this is a hack and not a proper solution, yet I still find it worth sharing. Plus I want to see CI running in my fork.

The fault tolerance extension loads bean classes from the deployment
classloader during fault tolerance discovery. The classes, as well as
discovered fault tolerance annotations, are transferred to runtime,
where SmallRye Fault Tolerance applies runtime configuration.

This works fine, unless one of the bean classes is generated
by another Quarkus extension. These generated classes are stored
in memory and the deployment classloader doesn't know about them.
Naturally, loading the class fails and aborts the build.

The specific problem found was in combination of Fault Tolerance
and RestClient Reactive. This commit makes sure that the RestClient
generated classes are known to the deployment classloader, but
it seems fairly obvious that this is a hacky one-off fix and
not a proper solution. I still find it worth sharing :-)
@Ladicek Ladicek force-pushed the fix-fault-tolerance-for-restclient-reactive branch from 39848a1 to fcdbeb2 Compare August 20, 2021 12:02
@Ladicek Ladicek changed the title fix Fault Tolerance in combination with RestClient Reactive Fix Fault Tolerance in combination with RestClient Reactive Aug 20, 2021
@Ladicek
Copy link
Contributor Author

Ladicek commented Aug 24, 2021

Fixed properly by #19609.

@Ladicek Ladicek closed this Aug 24, 2021
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Aug 24, 2021
@Ladicek Ladicek deleted the fix-fault-tolerance-for-restclient-reactive branch August 24, 2021 19:49
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.

1 participant