apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
859 stars 344 forks source link

Need to update CEQ service discovery setting for data type transformer #5047

Closed christophd closed 8 months ago

christophd commented 8 months ago

What happened?

Since Camel 4.0 data type transformer services have been moved from camel-kamelet-utils library to the Camel core project. With this migration the path to the service discovery for these kind of data type transformers has been changed from META-INF/services/org/apache/camel/datatype/converter/* to META-INF/services/org/apache/camel/datatype/transformer/*

Since Camel 4.2 data type transformer services have been move once again to META-INF/services/org/apache/camel/transformer/*

Camel K sets these service discovery paths as a Quarkus build time property quarkus.camel.service.discovery.include-patterns. We need to make sure that we support all values for Camel 3.x, 4.0 and 4.2 runtimes.

Steps to reproduce

Use a Camel runtime later than 3.x and run a KameletBinding/Pipe with data types that triggers the data type transformer service discovery resolving mechanism.

Relevant log output

org.apache.camel.CamelExecutionException: Missing data type transformer from camel:any to type aws2-s3:application-cloudevents on the exchange

Camel K version

2.2

christophd commented 8 months ago

A workaround for this is to set the service discovery path as a Maven setting on the IntegrationPlatform

For Camel 4.0 runtime (Camel K runtime 3.2.1):

k patch itp camel-k --type=merge -p '{"spec":{"build":{"maven":{"properties":{"quarkus.camel.service.discovery.include-patterns": "META-INF/services/org/apache/camel/datatype/transformer/*"}}}}}'

For Camel 4.2 runtime (Camel K runtime 3.6.0):

k patch itp camel-k --type=merge -p '{"spec":{"build":{"maven":{"properties":{"quarkus.camel.service.discovery.include-patterns": "META-INF/services/org/apache/camel/transformer/*"}}}}}'