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

Correlate Camel Quarkus recipes and tests versions and update to 4.9.0 #249

Closed
wants to merge 1 commit into from

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Jan 29, 2025

And update to 4.9.0.

I tried to update everything consistently but I still have the same error:

Unable to find classpath resource dependencies beginning with: 'jakarta.inject-api-2.0.0'.
The caller is of type org.apache.camel.upgrade.CamelTestUtil.

And some others probably due to the fact we updated OpenRewrite.

It will definitely need more work.

[ERROR] io.quarkus.updates.camel.camel40.CamelAPIsPropertiesTest.testRejectedPolicyDiscard -- Time elapsed: 0.285 s <<< FAILURE!
java.lang.AssertionError: 
[Recipe validation must have no failures] 
Expecting empty but was: [[Valid{property='CompositeRecipe.recipeList', value='[org.openrewrite.config.DeclarativeRecipe@905d26e3]'},
    Invalid{property='initialization', value='[org.openrewrite.config.DeclarativeRecipe@1145a741]', message='DeclarativeRecipe must not contain uninitialized recipes. Be sure to call .initialize() on DeclarativeRecipe.'},
    Invalid{property='io.quarkus.updates.camel.camel40.CamelQuarkusMigrationRecipe.recipeList[1] (in rewrite.yml)', value='org.openrewrite.java.camel.migrate.ChangePropertyValue', message='recipe 'org.openrewrite.java.camel.migrate.ChangePropertyValue' does not exist.'},
    Invalid{property='initialization', value='[org.openrewrite.config.DeclarativeRecipe@1145a741]', message='DeclarativeRecipe must not contain uninitialized recipes. Be sure to call .initialize() on DeclarativeRecipe.'},
    Invalid{property='io.quarkus.updates.camel.camel40.CamelQuarkusMigrationRecipe.recipeList[1] (in rewrite.yml)', value='org.openrewrite.java.camel.migrate.ChangePropertyValue', message='recipe 'org.openrewrite.java.camel.migrate.ChangePropertyValue' does not exist.'},
    Valid{property='ChangePropertyValue.newValue', value='Abort #DiscardOldest has been removed, consider Abort'},
    Valid{property='ChangePropertyValue.propertyKey', value='camel.threadpool.rejectedPolicy'},
    Valid{property='oldValue', value='DiscardOldest'},
    Valid{property='ChangePropertyValue.newValue', value='Abort #Discard has been removed, consider Abort'},
    Valid{property='ChangePropertyValue.propertyKey', value='camel.threadpool.rejectedPolicy'},
    Valid{property='oldValue', value='Discard'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getComponentNameResolver'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getModelJAXBContextFactory'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getModelToXMLDumper'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getRoutesLoader'},
    Valid{property='ChangeType.newFullyQualifiedTypeName', value='org.apache.camel.impl.engine.IntrospectionSupport'},
    Valid{property='ChangeType.oldFullyQualifiedTypeName', value='org.apache.camel.support.IntrospectionSupport'},
    Valid{property='ChangeMethodName.methodPattern', value='org.apache.camel.api.management.mbean.ManagedChoiceMBean choiceStatistics()'},
    Valid{property='ChangeMethodName.newMethodName', value='extendedInformation'},
    Valid{property='ChangeMethodName.methodPattern', value='org.apache.camel.api.management.mbean.ManagedFailoverLoadBalancerMBean exceptionStatistics()'},
    Valid{property='ChangeMethodName.newMethodName', value='extendedInformation'}],
    [Invalid{property='initialization', value='[org.openrewrite.config.DeclarativeRecipe@1145a741]', message='DeclarativeRecipe must not contain uninitialized recipes. Be sure to call .initialize() on DeclarativeRecipe.'},
    Invalid{property='io.quarkus.updates.camel.camel40.CamelQuarkusMigrationRecipe.recipeList[1] (in rewrite.yml)', value='org.openrewrite.java.camel.migrate.ChangePropertyValue', message='recipe 'org.openrewrite.java.camel.migrate.ChangePropertyValue' does not exist.'},
    Valid{property='ChangePropertyValue.newValue', value='Abort #DiscardOldest has been removed, consider Abort'},
    Valid{property='ChangePropertyValue.propertyKey', value='camel.threadpool.rejectedPolicy'},
    Valid{property='oldValue', value='DiscardOldest'},
    Valid{property='ChangePropertyValue.newValue', value='Abort #Discard has been removed, consider Abort'},
    Valid{property='ChangePropertyValue.propertyKey', value='camel.threadpool.rejectedPolicy'},
    Valid{property='oldValue', value='Discard'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getComponentNameResolver'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getModelJAXBContextFactory'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getModelToXMLDumper'},
    Valid{property='MoveGetterToPluginHelper.oldMethodName', value='getRoutesLoader'},
    Valid{property='ChangeType.newFullyQualifiedTypeName', value='org.apache.camel.impl.engine.IntrospectionSupport'},
    Valid{property='ChangeType.oldFullyQualifiedTypeName', value='org.apache.camel.support.IntrospectionSupport'},
    Valid{property='ChangeMethodName.methodPattern', value='org.apache.camel.api.management.mbean.ManagedChoiceMBean choiceStatistics()'},
    Valid{property='ChangeMethodName.newMethodName', value='extendedInformation'},
    Valid{property='ChangeMethodName.methodPattern', value='org.apache.camel.api.management.mbean.ManagedFailoverLoadBalancerMBean exceptionStatistics()'},
    Valid{property='ChangeMethodName.newMethodName', value='extendedInformation'}]]
	at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:220)
	at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:129)
	at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:124)
	at org.apache.camel.upgrade.camel40.CamelAPIsPropertiesTest.testRejectedPolicyDiscard(CamelAPIsPropertiesTest.java:50)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

@gsmet gsmet requested a review from JiriOndrusek January 29, 2025 10:16
@gsmet gsmet changed the title Correlate Camel Quarkus recipes and tests versions Correlate Camel Quarkus recipes and tests versions and update to 4.9.0 Jan 29, 2025
@JiriOndrusek
Copy link
Collaborator

JiriOndrusek commented Jan 29, 2025

I've prepared the upgrade to camel 4.9.0 in my branch - JiriOndrusek@1e9259c
I'll recheck it today and prepare a PR replacing this one.

When I tested it with a staging repo, all worked.

@JiriOndrusek
Copy link
Collaborator

Here is the new PR: #253

@gsmet gsmet closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants