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

Validate media types for sub resources in Resteasy Reactive #28565

Merged
merged 1 commit into from Oct 15, 2022

Conversation

Sgitario
Copy link
Contributor

At the moment, there are two places where resteasy reactive is verifying the media types: (1) at the handler ClassRoutingHandler only for the main resources (it's not invoked for sub-resources, and (2) at the handler RequestDeserializeHandler for the rest.

The issue is that the verification at RequestDeserializeHandler takes the one from the user which might not be compatible with the one set by the user using the annotation @Consumes.

Note that I tried to make this handler be invoked also for sub-resources but it caused more troubles and it would not fix the root cause of the issue that is the logic in the handler RequestDeserializeHandler is wrong.

Fix #28460

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

If the TCK passes, it's fine with me :)

@geoand geoand added triage/backport-2.13 triage/waiting-for-ci Ready to merge when CI successfully finishes labels Oct 13, 2022
At the moment, there are two places where resteasy reactive is verifying the media types: (1) at the handler `ClassRoutingHandler` only for the main resources (it's not invoked for sub-resources; and (2) at the handler `RequestDeserializeHandler` for the rest. 
The issue is that the verification at `RequestDeserializeHandler` takes the one from the user which might not be compatible with the one set by the user using the annotation `@Consumes`. 
Note that I tried to make this handler to be invoked also for sub resources but it caused more troubles and it would not fix the root cause of the issue that is the logic in the handler `RequestDeserializeHandler` is wrong. 
Fix quarkusio#28460
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 14, 2022

Failing Jobs - Building bfbfea6

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17
✔️ JVM Tests - JDK 17 MacOS M1
JVM Tests - JDK 18 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/flyway/deployment 
! Skipped: integration-tests/flyway integration-tests/hibernate-orm-tenancy/datasource integration-tests/hibernate-orm-tenancy/schema and 1 more

📦 extensions/flyway/deployment

io.quarkus.flyway.test.FlywayExtensionInitSqlTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:689)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)

⚙️ JVM Tests - JDK 18 #

- Failing: extensions/flyway/deployment 
! Skipped: integration-tests/flyway integration-tests/hibernate-orm-tenancy/datasource integration-tests/hibernate-orm-tenancy/schema and 1 more

📦 extensions/flyway/deployment

io.quarkus.flyway.test.FlywayExtensionInitSqlTest. - More details - Source on GitHub

java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.QuarkusUnitTest.beforeAll(QuarkusUnitTest.java:689)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)

@geoand
Copy link
Contributor

geoand commented Oct 14, 2022

@gastaldi ^ seems like the Flyway issues I was seeing locally...

@gastaldi
Copy link
Contributor

@geoand Ah-ha! Now I see these errors too: it's weird that I get a Build Success in my machine while running the tests, that's why I haven't noticed before.

@geoand
Copy link
Contributor

geoand commented Oct 14, 2022

We'll need to get to the bottom of it - at the very least we need to disable those tests

@gastaldi
Copy link
Contributor

@geoand that error you are seeing locally is intended, it appears when FlywayDevModeTest is run, but it doesn't fail the build

@geoand
Copy link
Contributor

geoand commented Oct 14, 2022

Then something fishy is going on 🙂

@gsmet gsmet merged commit d8f27da into quarkusio:main Oct 15, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 15, 2022
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Oct 15, 2022
@Sgitario Sgitario deleted the 28460 branch October 17, 2022 05:08
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.3.Final Oct 17, 2022
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.

@Consumes ignored for sub-resource
4 participants