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

Warn users if they mix RESTEasy Classic and Reactive #35454

Closed
rsvoboda opened this issue Aug 22, 2023 · 10 comments · Fixed by #35468
Closed

Warn users if they mix RESTEasy Classic and Reactive #35454

rsvoboda opened this issue Aug 22, 2023 · 10 comments · Fixed by #35468
Labels
kind/enhancement New feature or request
Milestone

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Aug 22, 2023

Description

Warn users if they mix RESTEasy Classic and Reactive.

We had issue with application that was RESTEasy Reactive base but we used resteasy-multipart-provider for easy work with multipart form data. Starting with Quarkus 3.0 there is MultipartFormDataInput so I could migrate the app to use it.

In our case it wasn't obvious what the trouble was because native image build failed with error message about ResourceCleaner, the issue was reported on product side in https://issues.redhat.com/browse/QUARKUS-3308

Is Quarkus able to detect that an application mixes RESTEasy Classic and Reactive? If so, there could be a warning about that - during the build and maybe also during the boot.

@rsvoboda rsvoboda added the kind/enhancement New feature or request label Aug 22, 2023
@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

We already do prevent users from mixing both extensions, but I suspect here you are adding some random RESTEasy dependency, correct?

@gsmet
Copy link
Member

gsmet commented Aug 22, 2023

Yes, in that case, it was a random RESTEasy Classic artifact.

I wonder if we detect when RESTEasy Reactive server is used with the classic REST Client though. I remember we had people reporting cases where we didn't properly detect the conflicts.

@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

I am pretty sure we can go through all dependencies and warn if a RESTEasy Classic dependency is added.

But yeah, the REST Client case would need to be handled

@gsmet
Copy link
Member

gsmet commented Aug 22, 2023

Yeah, using the CurateOutcomeBuildItem, we can definitely do that.

And it would solve the REST Client case too. Given we are pushing people towards RESTEasy Reactive, I think we could have this in the processor common to the RESTEasy Reactive server and client and throw an error if anything RESTEasy Classic is around (i.e. I wouldn't do anything on the RESTEasy Classic side).

@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

That sounds like a good idea, but I am still on the fence of whether we should just warn or fail in the RESTEasy Reactive Server + RESTEasy Classic Client case.

@gsmet
Copy link
Member

gsmet commented Aug 22, 2023

Well, is it a working combination? From the reports we had, I thought it wasn't working very well. But maybe I misremember.

@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

Same, I don't remember either, I would need to check :)

@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

I did some tests and under some circumestances the combination works. So I think that we should be convervative and only warn for the RESTEasy Reactive Server + RESTEasy Classic Client combination.

WDYT?

@gsmet
Copy link
Member

gsmet commented Aug 22, 2023

I dunno. Maybe we could be conservative in a few versions and raise an error after that?

I mean the first thing we will do if someone reports a bug with this combination is to ask them to be consistent, so I don't think it makes sense to support this combination long term :).

@geoand
Copy link
Contributor

geoand commented Aug 22, 2023

I dunno. Maybe we could be conservative in a few versions and raise an error after that?\

Absolutely, that's the best course of action IMHO.

#35468 is what I have in mind

geoand added a commit to geoand/quarkus that referenced this issue Aug 23, 2023
gsmet added a commit that referenced this issue Aug 23, 2023
Provide additional safeguards when mixing RESTEasy stacks
@quarkus-bot quarkus-bot bot added this to the 3.4 - main milestone Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants