-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update openrewrite + Camel recipe #21
Conversation
Camel 4.10 is using SB 3.4.x Camel 4.9 is also using SB 3.4.x Camel 4.8 is using SB 3.3.x |
@@ -33,7 +33,8 @@ | |||
<description>Migration recipes (using openrewrite) for Camel Spring Boot to make Maven migrations easier</description> | |||
|
|||
<properties> | |||
<spring-rewrite-version>5.24.1</spring-rewrite-version> | |||
<!-- Update this with each spring-rewrite release --> | |||
<spring-rewrite-version>6.0.1</spring-rewrite-version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rewrite-recipe-bom:2.23.1 manages rewrites-spring:5.24.1.
https://repo1.maven.org/maven2/org/openrewrite/recipe/rewrite-recipe-bom/2.23.1/rewrite-recipe-bom-2.23.1.pom
OpenRewrite works best when versions released together are used together, to avoid any missing references when there are internal changes.
What's the reason to override that version here? And are you aware of the license change between 5.x and 6.x?
We recently made some accommodations to remove dependencies on MSAL modules for Quarkus in
rewrite-spring is one of those MSAL modules, so can't itself be removed without a loss of function. The managed older version is still Apache licensed, so could be used until the way forward is clear.
<spring-rewrite-version>6.0.1</spring-rewrite-version> | |
<spring-rewrite-version>5.24.1</spring-rewrite-version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @timtebeek thanks a lot for your input, I just removed the properties section and the version, so that the BOM handles it.
I was hoping for org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4 recipe, this is why I updated the version, but that recipe has not been released yet, therefore, I think that right now this is the best we can achieve, but, once UpgradeSpringBoot_3_4 we'll have to update either bom version or rewrite-spring version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Indeed best to rely on the rewrite-recipe-bom version for a compatible recipe module release. We release every two weeks, so expect an update regularly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to bother you @timtebeek , but I think this situation is a corner case, the Apache Camel release 4.9.0 uses Spring Boot 3.4.x, but the upgrade for SB 3.4 has not released yet, therefore I think we have the following approaches:
- Wait for the SB 3_4 recipe release before releasing camel-upgrade-recipes 4.9.0 (not great from my point of view, @davsclaus do you have any comment about it?)
- Use the SpringBoot_3_3 upgrade recipe and update Spring Boot versions to 3.4.x via org.openrewrite.maven.UpgradeDependencyVersion (there may be issues, SB upgrades are stable, but you never know..)
- Do not upgrade Spring Boot at all
Do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem at all! Does Camel 4.9.0 use Spring Boot in a way that's incompatible with Spring Boot 3.3? Or is it merely that it's built against 3.4 but expected to mostly still work with 3.3 if that part is not upgraded?
It might be some time before a public 3.4 recipe is available, as seen from the issue:
Internally we're further along, but there's no set timeline if or when that will become available, although any help is of course welcome.
As for your options now: I think you're likely fine to keep the Spring Boot 3.3 recipe in there; to be swapped out for 3.4 when available. I'm not sure how much users of Apache Camel have come to rely upon the recipes you provide to also upgrade their Spring Boot version, but documenting that some work might be required there could go a long way as well.
56fdd8d
to
17e0eef
Compare
I do not recall any breaking changes etc so I would expect Camel 4.9/4.10 to also run on SB 3.3.x. We just dont have capacity to do throughly testing of N+ versions of SB for a given Camel release and as such we test with latest release, hence the 3.3 -> 3.4 upgrade. |
mvn --no-transfer-progress org.openrewrite.maven:rewrite-maven-plugin:6.0.4:run -Drewrite.recipeArtifactCoordinates=org.apache.camel.upgrade:camel-upgrade-recipes:4.9.0 -Drewrite.activeRecipes=org.apache.camel.upgrade.CamelMigrationRecipe
the recipe updates Camel versions and upgrade projects to java 17