maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[WIP] Upgrade spring-boot-starter from version 2.7.x to 3.3.x

Open mroyme opened this issue 1 year ago • 2 comments

Pull Request type

  • [ ] Bugfix
  • [ ] Feature
  • [x] Refactoring (no functional changes, no api changes)
  • [x] Build related changes (Please run ./gradlew build --write-locks to refresh dependencies)
  • [x] Other (please describe) Dependency upgrade: Upgrading spring-boot from version 2.7.+ to 3.3.+

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR


Note: Why Apache bVal and not Hibernate Validator or Spring Boot Validator?

A: Firstly, Spring Boot Validator transitively depends on Hibernate Validator, so using either of them provides the same underlying Bean Validation implementation.

The problem with using Hibernate Validator is that it breaks the existing tests.

What I noticed is that validator.validate(...) would always raise twice the number of violations. One of which is the actual violation and the other with empty values. I tried to find the cause, and came across a few threads with some not so convincing explanations and workarounds, none of which seemed to work. And after spending a good few hours trying to figure the problem, I still couldn't understand why I was seeing that behavior.

In the end, I gave BVal a shot, and it worked fine on the first try. Anyway, BVal supports Bean Validation 3.0, is TCK certified and is being updated frequently. So, I didn't see any reason not to go with it. Also, if we indeed want to use some different implementation in the future; we just have to remove the BVal dependency and add whatever else we want to use.

mroyme avatar Jul 26 '24 10:07 mroyme

https://github.com/Netflix/maestro/issues/8 is the issue.

mroyme avatar Jul 26 '24 10:07 mroyme

Okay, I just found out this needs work. This causes problems with the way the project uses Jackson. Will spend some time to see how I can fix that.

mroyme avatar Jul 26 '24 12:07 mroyme

Close the PR as this has been done by #105

jun-he avatar May 16 '25 05:05 jun-he