You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/08/02 10:34:47 UTC

[GitHub] [camel-k] astefanutti edited a comment on pull request #2536: feat: Quarkus native build support

astefanutti edited a comment on pull request #2536:
URL: https://github.com/apache/camel-k/pull/2536#issuecomment-890918322


   So generating the following file during the project generation `src/main/resources/reflection-config.json`:
   ```json
   [
     {
       "name" : "java.lang.String",
       "allPublicMethods" : true
     }
   ]
   ```
   And adding the `quarkus.native.additional-build-args=-H:ReflectionConfigurationFiles=reflection-config.json` build property works:
   
   ```console
   $ kamel run examples/languages/routes.yaml --logs
   Integration "routes" created
   Condition "IntegrationPlatformAvailable" is "True" for Integration routes: astefanu/camel-k
   Integration routes in phase "Initialization"
   Integration routes in phase "Building Kit"
   Condition "IntegrationKitAvailable" is "False" for Integration routes: creating a new integration kit
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Integration Kit) changed phase to "Build Submitted"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Build) changed phase to "Scheduling"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Build) changed phase to "Pending"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Build) changed phase to "Running"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Integration Kit) changed phase to "Build Running"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Build) changed phase to "Succeeded"
   Integration routes subresource kit-c43sgj6vs72714dt3jsg (Integration Kit) changed phase to "Ready"
   Condition "IntegrationKitAvailable" is "True" for Integration routes: kit-c43sgj6vs72714dt3jsg
   Integration routes in phase "Deploying"
   Condition "DeploymentAvailable" is "True" for Integration routes: deployment name is routes
   Condition "CronJobAvailable" is "False" for Integration routes: different controller strategy used (deployment)
   Condition "KnativeServiceAvailable" is "False" for Integration routes: different controller strategy used (deployment)
   Integration routes in phase "Running"
   Condition "Ready" is "False" for Integration routes
   [1] Monitoring pod routes-66886d9564-swf9n
   [1] 2021-08-02 10:30:48,198 INFO  [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.8.0
   [1] 2021-08-02 10:30:48,199 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
   [1] 2021-08-02 10:30:48,199 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='camel-k-embedded-flow', language='yaml', type='source', location='file:/etc/camel/sources/camel-k-embedded-flow.yaml', }
   [1] 2021-08-02 10:30:48,203 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes startup summary (total:1 started:1)
   [1] 2021-08-02 10:30:48,203 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route1 (timer://tick)
   [1] 2021-08-02 10:30:48,203 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 3.11.0 (camel-1) started in 1ms (build:0ms init:1ms start:0ms)
   [1] 2021-08-02 10:30:48,204 INFO  [io.quarkus] (main) camel-k-integration 1.6.0-SNAPSHOT native (powered by Quarkus 2.0.0.Final) started in 0.012s. 
   [1] 2021-08-02 10:30:48,204 INFO  [io.quarkus] (main) Profile prod activated. 
   [1] 2021-08-02 10:30:48,204 INFO  [io.quarkus] (main) Installed features: [camel-bean, camel-core, camel-k-core, camel-k-runtime, camel-log, camel-support-common, camel-timer, camel-yaml-dsl, cdi]
   Condition "Ready" is "True" for Integration routes
   [1] 2021-08-02 10:30:49,205 INFO  [info] (Camel (camel-1) thread #0 - timer://tick) Exchange[ExchangePattern: InOnly, BodyType: String, Body: HELLO YAML !!!]
   [1] 2021-08-02 10:30:54,203 INFO  [info] (Camel (camel-1) thread #0 - timer://tick) Exchange[ExchangePattern: InOnly, BodyType: String, Body: HELLO YAML !!!]
   [1] 2021-08-02 10:30:59,203 INFO  [info] (Camel (camel-1) thread #0 - timer://tick) Exchange[ExchangePattern: InOnly, BodyType: String, Body: HELLO YAML !!!]
   ```
   
   The native build time seems stable around 4m30s:
   
   ```console
   $ kubectl get builds.camel.apache.org
   NAME                       PHASE       AGE     STARTED   DURATION          ATTEMPTS
   kit-c43s8si2qa460fs1tumg   Succeeded   4m53s   4m53s     4m28.894542898s 
   ```
   
   The `reflection-config.json` build configuration file could be generated based on language inspection. Also, it seems there is no need for `quarkus.camel.native.reflection.include-patterns` in that case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org