Skip to content

Conversation

marko-bekhta
Copy link
Contributor

@marko-bekhta marko-bekhta commented Jun 18, 2025

This PR tries to address a few things

  • The upgrade to Hibernate Validator 9.0.1 Bump org.hibernate.validator:hibernate-validator from 9.0.0.Final to 9.0.1.Final #48380 (comment)
  • "simplification" of the traversable resolver that is part of the Hibernate Validator. I may have "oversimplified" it here but here are my thoughts. Since the change to cache the persistence utils in the built-in JPATraversalbeResolver I was thinking that we could skip even more operations when we are within Quarkus. From what I can see the current implementation in the JPA would eventually delegate to ProviderUtil that have its own implementation in Quarkus, which is shared by ORM/Reactive. I was thinking that we could also try to eliminate the extra calls to retrieve the persistence providers and also the loops if we know that all we'd get is ProviderUtil.
  • Since the "predicate" to delegate the resolver check is now added only if ORM is enabled, it should also address the problem with the native build mentioned here: @Valid throws NPE if hibernate-orm is disabled in native mode #48270

@quarkus-bot quarkus-bot bot added area/hibernate-validator Hibernate Validator area/hibernate-orm Hibernate ORM labels Jun 18, 2025
Copy link

quarkus-bot bot commented Jun 18, 2025

/cc @gsmet (hibernate-orm)

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator-spi</artifactId>
<optional>true</optional> <!-- conditional dependency -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually SPI modules aren't optional, because the presence of the SPI doesn't mean that the actual extension that leverages the build items (in this case quarkus-hibernate-validator-deployment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, got it 😃 ! Let me clean it up and see if it all still works (it should, right? but 😃)

Copy link
Contributor

Choose a reason for hiding this comment

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

It should yeah :)

This comment has been minimized.

Copy link

github-actions bot commented Jun 18, 2025

🎊 PR Preview 2c5bbae has been successfully built and deployed to https://quarkus-pr-main-48458-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@marko-bekhta marko-bekhta force-pushed the fix/i48270-change-how-traversable-resolver-is-set branch from 4f22d8d to 28a73f6 Compare June 18, 2025 15:16
Copy link

quarkus-bot bot commented Jun 18, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 28a73f6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

This comment has been minimized.

@geoand geoand requested a review from gsmet June 19, 2025 08:27
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I'm wondering if we are not pushing things a bit too far but only time will tell :).

Thanks for the PR!

@gsmet gsmet merged commit 271aeb6 into quarkusio:main Jun 19, 2025
111 of 113 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.25 - main milestone Jun 19, 2025
@gsmet gsmet modified the milestones: 3.25 - main, 3.24.1 Jun 24, 2025
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.

3 participants