[GitHub] [camel-quarkus] lburgazzoli closed issue #198: Remove custom registry implementation
lburgazzoli closed issue #198: Remove custom registry implementation URL: https://github.com/apache/camel-quarkus/issues/198 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #230: Ensure the PlatformHttpComponent is registered before the routes are started
asf-ci commented on issue #230: Ensure the PlatformHttpComponent is registered before the routes are started URL: https://github.com/apache/camel-quarkus/pull/230#issuecomment-538756865 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/209/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli merged pull request #229: Do not use deprecated methods
lburgazzoli merged pull request #229: Do not use deprecated methods URL: https://github.com/apache/camel-quarkus/pull/229 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli opened a new pull request #230: Ensure the PlatformHttpComponent is registered before the routes are started
lburgazzoli opened a new pull request #230: Ensure the PlatformHttpComponent is registered before the routes are started URL: https://github.com/apache/camel-quarkus/pull/230 Fixes #218 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #229: Do not use deprecated methods
asf-ci commented on issue #229: Do not use deprecated methods URL: https://github.com/apache/camel-quarkus/pull/229#issuecomment-538749251 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/208/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] oscerd merged pull request #134: Fix #133 Test netty4-http as a producer
oscerd merged pull request #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] oscerd closed issue #133: Test netty4-http as a producer
oscerd closed issue #133: Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/issues/133 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #134: Fix #133 Test netty4-http as a producer
asf-ci commented on issue #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134#issuecomment-538693716 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/207/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on issue #134: Fix #133 Test netty4-http as a producer
ppalaga commented on issue #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134#issuecomment-538688567 3821fca rebased and fixed. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #228: Cleanup
ppalaga commented on a change in pull request #228: Cleanup URL: https://github.com/apache/camel-quarkus/pull/228#discussion_r331759366 ## File path: extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java ## @@ -58,29 +60,25 @@ void beans(BuildProducer beanProducer) { @BuildStep CamelRegistryBuildItem registry( CamelRecorder recorder, +RecorderContext recorderContext, ApplicationArchivesBuildItem applicationArchives, List registryItems) { RuntimeValue registry = recorder.createRegistry(); -CamelSupport.services(applicationArchives).filter( -si -> registryItems.stream().noneMatch( -c -> Objects.equals(si.name, c.getName()) && c.getType().isAssignableFrom(si.type) -) -).forEach( -si -> { -LOGGER.debug("Binding camel service {} with type {}", si.name, si.type); +CamelSupport.services(applicationArchives).forEach(si -> { +LOGGER.debug("Binding bean with name: {}, type {}", si.name, si.type); recorder.bind( registry, si.name, -si.type +recorderContext.classProxy(si.type) Review comment: As far as I could understand, `RecorderContext.classProxy(String)` postpones the class loading to runtime. Do some things break for us without using the classProxy? In other words, I wonder why is this better than passing the class name and do Class.forName() in the recorder that we had before? Maybe we need this because it postpones not only the class loading but also the class initialization? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli merged pull request #228: Cleanup
lburgazzoli merged pull request #228: Cleanup URL: https://github.com/apache/camel-quarkus/pull/228 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #228: Cleanup
asf-ci commented on issue #228: Cleanup URL: https://github.com/apache/camel-quarkus/pull/228#issuecomment-538659049 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/206/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] nicolaferraro edited a comment on issue #944: Release Camel K 1.0.0-M2
nicolaferraro edited a comment on issue #944: Release Camel K 1.0.0-M2 URL: https://github.com/apache/camel-k/issues/944#issuecomment-538636280 ## New Features - Added support for using kamel CLI in Tekton Pipelines ([#943](https://github.com/apache/camel-k/pull/943), [@nicolaferraro](https://github.com/nicolaferraro)) - Improved kamel CLI experience with remote clusters (90% faster) ([#940](https://github.com/apache/camel-k/pull/940), [@nicolaferraro](https://github.com/nicolaferraro)) - Added automatic resolution of dependencies for language expressions ([#957](https://github.com/apache/camel-k/pull/957), [@jamesnetherton](https://github.com/jamesnetherton)) - Added support for Knative (Serving and Eventing) 0.8.x and 0.9.x ([#961](https://github.com/apache/camel-k/pull/961), [@nicolaferraro](https://github.com/nicolaferraro)) - Added support for proxy servers in Kaniko builds ([#905](https://github.com/apache/camel-k/pull/905), [@jamesnetherton](https://github.com/jamesnetherton)) - Enable integration scale sub-resource ([#962](https://github.com/apache/camel-k/pull/962), [@astefanutti](https://github.com/astefanutti)) ## Bug Fixes - Dev mode now shows if the build failed ([#927](https://github.com/apache/camel-k/pull/927), [@jamesnetherton](https://github.com/jamesnetherton)) - Restricted gc discovery to listable types ([#917](https://github.com/apache/camel-k/pull/917), [@astefanutti](https://github.com/astefanutti)) - Fixed issue which prevented creating builds on GKE ([#979](https://github.com/apache/camel-k/pull/979), [@nicolaferraro](https://github.com/nicolaferraro)) - Fixed Jolokia and Prometheus traits configuration ([#954](https://github.com/apache/camel-k/pull/954), [@astefanutti](https://github.com/astefanutti)) - Updated 'CONTEXT' column header in 'kamel get' output to 'KIT' ([#964](https://github.com/apache/camel-k/pull/964), [@jamesnetherton](https://github.com/jamesnetherton)) ## Other Notable Changes - Release notes are now auto-generated ([#963](https://github.com/apache/camel-k/pull/963), [@nicolaferraro](https://github.com/nicolaferraro)) - Improve "kamel get" command to enable specifying integration name ([#897](https://github.com/apache/camel-k/pull/897), [@jamesnetherton](https://github.com/jamesnetherton)) - Removed usage of hostnames instead of IP addresses when referencing the internal registry on Knative profile ([#916](https://github.com/apache/camel-k/pull/916), [@astefanutti](https://github.com/astefanutti)) - Upgrade to Operator SDK 0.10.0 ([#949](https://github.com/apache/camel-k/pull/949), [@astefanutti](https://github.com/astefanutti)) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331745092 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java ## @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.core; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.spi.BeanRepository; + +public final class RuntimeBeanRepository implements BeanRepository { Review comment: Yes, sorry, of course, that would be a valid reason to reject my proposal. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331745033 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java ## @@ -55,6 +47,21 @@ */ @ConfigItem(defaultValue = "false") public boolean disableXml; + +/** + * Disable camel-main. + * When main is disabled, routes won't be automatically be loaded and + * started and the entire lifecycle of the Camel Context is under user + * control. + */ +@ConfigItem(defaultValue = "false") +public boolean disableMain; Review comment: I'd personaly vote for discontinuing the bad practice now and eventually rename the other props later. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #134: Fix #133 Test netty4-http as a producer
asf-ci commented on issue #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134#issuecomment-538644914 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/205/Failed Tests: 2camel-quarkus-pr/org.apache.camel.quarkus:camel-quarkus-integration-test-netty4-http: 2org.apache.camel.quarkus.component.netty4.http.CamelTest.netty4HttpProducerorg.apache.camel.quarkus.component.netty4.http.CamelIT.netty4HttpProducer 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli commented on issue #141: Include camel-k-runtime version in camel-catalog
lburgazzoli commented on issue #141: Include camel-k-runtime version in camel-catalog URL: https://github.com/apache/camel-k-runtime/issues/141#issuecomment-538644484 Fixed by #142 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli closed issue #141: Include camel-k-runtime version in camel-catalog
lburgazzoli closed issue #141: Include camel-k-runtime version in camel-catalog URL: https://github.com/apache/camel-k-runtime/issues/141 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli closed pull request #227: chore: use RecorderContext to load classes when possible to delegate class loading to quarkus engine
lburgazzoli closed pull request #227: chore: use RecorderContext to load classes when possible to delegate class loading to quarkus engine URL: https://github.com/apache/camel-quarkus/pull/227 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #227: chore: use RecorderContext to load classes when possible to delegate class loading to quarkus engine
asf-ci commented on issue #227: chore: use RecorderContext to load classes when possible to delegate class loading to quarkus engine URL: https://github.com/apache/camel-quarkus/pull/227#issuecomment-538642302 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/204/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #134: Fix #133 Test netty4-http as a producer
lburgazzoli commented on issue #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134#issuecomment-538641929 @ppalaga can you rebase ? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli edited a comment on issue #134: Fix #133 Test netty4-http as a producer
lburgazzoli edited a comment on issue #134: Fix #133 Test netty4-http as a producer URL: https://github.com/apache/camel-quarkus/pull/134#issuecomment-538641929 @ppalaga can you rebase/fix conflicts ? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] nicolaferraro commented on issue #944: Release Camel K 1.0.0-M2
nicolaferraro commented on issue #944: Release Camel K 1.0.0-M2 URL: https://github.com/apache/camel-k/issues/944#issuecomment-538636280 ## New Features - Added support for using kamel CLI in Tekton Pipelines ([#943](https://github.com/apache/camel-k/pull/943), [@nicolaferraro](https://github.com/nicolaferraro)) - Improved kamel CLI experience with remote clusters (90% faster) ([#940](https://github.com/apache/camel-k/pull/940), [@nicolaferraro](https://github.com/nicolaferraro)) - Added automatic resolution of dependencies for language expressions ([#957](https://github.com/apache/camel-k/pull/957), [@jamesnetherton](https://github.com/jamesnetherton)) - Added support for Knative (Serving and Eventing) 0.8.x and 0.9.x ([#961](https://github.com/apache/camel-k/pull/961), [@nicolaferraro](https://github.com/nicolaferraro)) - Added support for proxy servers in Kaniko builds ([#905](https://github.com/apache/camel-k/pull/905), [@jamesnetherton](https://github.com/jamesnetherton)) ## Bug Fixes - Dev mode now shows if the build failed ([#927](https://github.com/apache/camel-k/pull/927), [@jamesnetherton](https://github.com/jamesnetherton)) - Restricted gc discovery to listable types ([#917](https://github.com/apache/camel-k/pull/917), [@astefanutti](https://github.com/astefanutti)) - Fixed issue which prevented creating builds on GKE ([#979](https://github.com/apache/camel-k/pull/979), [@nicolaferraro](https://github.com/nicolaferraro)) - Fixed Jolokia and Prometheus traits configuration ([#954](https://github.com/apache/camel-k/pull/954), [@astefanutti](https://github.com/astefanutti)) - Updated 'CONTEXT' column header in 'kamel get' output to 'KIT' ([#964](https://github.com/apache/camel-k/pull/964), [@jamesnetherton](https://github.com/jamesnetherton)) ## Other Notable Changes - Release notes are now auto-generated ([#963](https://github.com/apache/camel-k/pull/963), [@nicolaferraro](https://github.com/nicolaferraro)) - Improve "kamel get" command to enable specifying integration name ([#897](https://github.com/apache/camel-k/pull/897), [@jamesnetherton](https://github.com/jamesnetherton)) - Removed usage of hostnames instead of IP addresses when referencing the internal registry on Knative profile ([#916](https://github.com/apache/camel-k/pull/916), [@astefanutti](https://github.com/astefanutti)) - Upgrade to Operator SDK 0.10.0 ([#949](https://github.com/apache/camel-k/pull/949), [@astefanutti](https://github.com/astefanutti)) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli merged pull request #226: Use MainSupport as base for running Camel
lburgazzoli merged pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli closed issue #146: Quarkus examples fail on mvn:release
lburgazzoli closed issue #146: Quarkus examples fail on mvn:release URL: https://github.com/apache/camel-k-runtime/issues/146 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli merged pull request #147: Disbale deploy task for examples
lburgazzoli merged pull request #147: Disbale deploy task for examples URL: https://github.com/apache/camel-k-runtime/pull/147 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] nicolaferraro commented on issue #147: Disbale deploy task for examples
nicolaferraro commented on issue #147: Disbale deploy task for examples URL: https://github.com/apache/camel-k-runtime/pull/147#issuecomment-538635138 Thanks 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli opened a new pull request #147: Disbale deploy task for examples
lburgazzoli opened a new pull request #147: Disbale deploy task for examples URL: https://github.com/apache/camel-k-runtime/pull/147 @nferraro should fix #146 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538631227 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/203/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli commented on issue #146: Quarkus examples fail on mvn:release
lburgazzoli commented on issue #146: Quarkus examples fail on mvn:release URL: https://github.com/apache/camel-k-runtime/issues/146#issuecomment-538629635 I think we can disable release for all the examples 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k-runtime] nicolaferraro opened a new issue #146: Quarkus examples fail on mvn:release
nicolaferraro opened a new issue #146: Quarkus examples fail on mvn:release URL: https://github.com/apache/camel-k-runtime/issues/146 Because of no main artifact defined. Disabled in current release (no need). We should make sure they don't fail for nex. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331736686 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java ## @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.core; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.spi.BeanRepository; + +public final class RuntimeBeanRepository implements BeanRepository { Review comment: I've inlined it but can we please be pragmatic an try to solve one problem at time ? BeanManagerHelper was there long before this PR and was used in very same way so to me it is unrelated to this PR. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538625080 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/202/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331734008 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java ## @@ -55,6 +47,21 @@ */ @ConfigItem(defaultValue = "false") public boolean disableXml; + +/** + * Disable camel-main. + * When main is disabled, routes won't be automatically be loaded and + * started and the entire lifecycle of the Camel Context is under user + * control. + */ +@ConfigItem(defaultValue = "false") +public boolean disableMain; Review comment: It uses negation to be consistent with other properties 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331734010 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/Flags.java ## @@ -38,4 +38,10 @@ public boolean getAsBoolean() { } } +public static final class MainDisabled implements BooleanSupplier { Review comment: Same as above 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538600945 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/201/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538581813 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/200/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331701127 ## File path: integration-tests/bean/pom.xml ## @@ -30,6 +30,10 @@ Integration tests for Camel Bean extension + +org.apache.camel.quarkus +camel-quarkus-core Review comment: Core is redundant here, isn't it? And similarly in other itests. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331696222 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java ## @@ -55,6 +47,21 @@ */ @ConfigItem(defaultValue = "false") public boolean disableXml; + +/** + * Disable camel-main. + * When main is disabled, routes won't be automatically be loaded and + * started and the entire lifecycle of the Camel Context is under user + * control. + */ +@ConfigItem(defaultValue = "false") +public boolean disableMain; Review comment: I'd generally vote for using non-negated names, e.g. `mainEnabled` in this case. I find them easier to decipher, esp. when used with a negator. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331699753 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/Flags.java ## @@ -38,4 +38,10 @@ public boolean getAsBoolean() { } } +public static final class MainDisabled implements BooleanSupplier { Review comment: This could eventually also get un-negated. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331700451 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java ## @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.core; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.spi.BeanRepository; + +public final class RuntimeBeanRepository implements BeanRepository { Review comment: RuntimeBeanRepository being the only caller of BeanManagerHelper, is there a reason to keep them separate? I mean the invocations of BeanManagerHelper could be inlined here. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538557724 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/199/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #226: Use MainSupport as base for running Camel
lburgazzoli commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538535869 Move camel-main bits to camel-core, user can opt-out - thus have the full resposability of setting up and starting camel contest - by setting `quarkus.camel.disable-main = false` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #226: Use MainSupport as base for running Camel
lburgazzoli commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538535999 @ppalaga @davsclaus do you mind a doing a final review ? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538507707 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/198/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538408842 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/197/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331503343 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: I am trying to understand the significance of this. In case this is meant to be a speciality for <20% of users, then I think we should figure out how not confuse the rest 80% of the users. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331500021 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: Do you need this in Camel K? Do you think 80+% of Camel Quarkus users will need this? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331497667 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { Review comment: True, the set of all current callers is the ultimate source of the truth for each recorder method. But isn't this particular method based on the assumption that it will be called exactly once in a very specific phase? I guess these assumptions are supposed to stay rather stable over time and any future change will require a thorough review. Therefore documenting the assumptions might be a good idea. Maybe I am just projecting something into the code that really is not there? I do not want to nitpick, I want to understand myself and eventually make the understanding easier to the people who will read the code after us. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331497667 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { Review comment: True, the set of all current callers is the ultimate source of the truth for each recorder method. But isn't this particular method based in the assumption that it will be called exactly once in a very specific phase? I guess these assumptions are supposed to stay rather stable over time and any future change will require a thorough review. Therefore documenting the assumptions might be a good idea. Maybe I am just projecting something into the code that really is not there? I do not want to nitpick, I want to understand myself and eventually make the understanding easier to the people who will read the code after us. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #226: Use MainSupport as base for running Camel
asf-ci commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538389611 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/196/ 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331489009 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: You want to have a better control about the context initialization, set-up and life cycle as example. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331487758 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { Review comment: I can add them but it does not give much info and guarantees as in fact the behaviour depends to the target phase of the build steps that invokes the recorder. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331483543 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: What are the potential use cases for creating one's own "mains"? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331482604 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; +import org.apache.camel.quarkus.core.deployment.CamelSupport; +import org.jboss.jandex.IndexView; + +public class SubstrateProcessor { Review comment: Thanks, makes sense. How about adding a class level JavaDoc something like `Produces BuildItems from the io.quarkus.deployment.builditem.substrate package` ? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #226: Use MainSupport as base for running Camel
lburgazzoli commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538378764 @ppalaga findings fixed (I hope) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #983: Add Kamel CLI download link to OpenShift Web console
astefanutti commented on issue #983: Add Kamel CLI download link to OpenShift Web console URL: https://github.com/apache/camel-k/pull/983#issuecomment-538378218 I'm undecided whether the CLI download link resource should be created as well during integration platform initialisation. This would enable installing the CLI for Camel K install done via Operator Hub. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331477835 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: camel-quarkus-core is supposed to be used by people who want to create their own "main" whereas camel-quarkus-main does provide a ready to use "main" so no, component extensions should not depends on main otherwise it won't be possible for people to create their own main 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti opened a new pull request #983: Add Kamel CLI download link to OpenShift Web console
astefanutti opened a new pull request #983: Add Kamel CLI download link to OpenShift Web console URL: https://github.com/apache/camel-k/pull/983 Fixes #939. **Release Note** ``` Add Kamel CLI download link to OpenShift Web console ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331477047 ## File path: extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java ## @@ -30,25 +37,45 @@ @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) -.addClasses(Routes.class) -.addAsResource(new StringAsset( -"quarkus.camel.servlet.url-patterns=/*\n" -+ "quarkus.camel.servlet.servlet-name=my-named-servlet\n" -+ "quarkus.camel.servlet.servlet-class=" + CustomServlet.class.getName() + "\n"), -"application.properties")); +.addAsResource(applicationProperties(), "application.properties")); @Test -public void customDefaultServletClass() { -RestAssured.when().get("/custom").then() -.body(IsEqual.equalTo("GET: /custom")) -.and().header("x-servlet-class-name", CustomServlet.class.getName()); +public void customDefaultServletClass() throws Exception { +DefaultCamelContext context = new DefaultCamelContext(); +context.addRoutes(new Routes()); +context.start(); Review comment: camel-core does not loads routes anymore 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331473156 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; +import org.apache.camel.quarkus.core.deployment.CamelSupport; +import org.jboss.jandex.IndexView; + +public class SubstrateProcessor { Review comment: `SubstrateProcessor` is meant to contains build steps related to substrate like reflection, substrate properties and so on. The distinction is juts logical so one know where to look depending of the context. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] jacobborella edited a comment on issue #982: Build operator image from non-Linux local OS
jacobborella edited a comment on issue #982: Build operator image from non-Linux local OS URL: https://github.com/apache/camel-k/issues/982#issuecomment-538365139 I did the following make clean make cp kamel /usr/local/bin/kamel make images env GOOS=linux GOARCH=amd64 make build-kamel cp kamel build/_output/bin/ operator-sdk build docker.io/apache/camel-k:1.0.0-M2-SNAPSHOT kamel install and then it worked. Thanks a lot for your help. I'll now get started getting more acquainted with the project. Let me know if there's anything specific you would like me to look at. Otherwise I'll probably look if I can fix any of the open issues. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #982: Build operator image from non-Linux local OS
astefanutti commented on issue #982: Build operator image from non-Linux local OS URL: https://github.com/apache/camel-k/issues/982#issuecomment-538370096 @jacobborella happy to have you on the project. You can start with the issues labelled as _easy fix_. Otherwise, I think #751 or #665 could be interesting candidates to get hands-on into the project. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331467894 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/BeanManagerHelper.java ## @@ -27,25 +27,35 @@ import javax.enterprise.inject.spi.BeanManager; import io.quarkus.arc.Arc; +import io.quarkus.arc.ArcContainer; +/** + * Helper methods retrieve beans from the {@link Arc} container. Review comment: ... methods _to_ retrieve ... maybe? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti closed issue #794: All links of the documentation are missing spaces before and after displayed text
astefanutti closed issue #794: All links of the documentation are missing spaces before and after displayed text URL: https://github.com/apache/camel-k/issues/794 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #794: All links of the documentation are missing spaces before and after displayed text
astefanutti commented on issue #794: All links of the documentation are missing spaces before and after displayed text URL: https://github.com/apache/camel-k/issues/794#issuecomment-538368253 It seems it's been fixed. Let me close this. Feel free to re-open if needed. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331463020 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; +import org.apache.camel.quarkus.core.deployment.CamelSupport; +import org.jboss.jandex.IndexView; + +public class SubstrateProcessor { Review comment: There is `org.apache.camel.quarkus.main.deployment.BuildProcessor` and `org.apache.camel.quarkus.main.deployment.SubstrateProcessor`. Both contain build steps and it is not clear to me what would be the criteria to decide for the current and future build steps into which one they belong? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331464787 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { Review comment: Sorry I meant static init vs. runtime init. It matters for the kinds of resources available inside the method and it gives a hint about ordering. Of course, the info can be looked up in the IDE, but when in a comment, it helps to faster understand the context. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] jacobborella edited a comment on issue #982: Build operator image from non-Linux local OS
jacobborella edited a comment on issue #982: Build operator image from non-Linux local OS URL: https://github.com/apache/camel-k/issues/982#issuecomment-538365139 I did the following make clean make cp kamel /usr/local/bin/kamel make images GOOS=linux make build-kamel cp kamel build/_output/bin/ operator-sdk build docker.io/apache/camel-k:1.0.0-M2-SNAPSHOT kamel install and then it worked. Thanks a lot for your help. I'll now get started getting more acquainted with the project. Let me know if there's anything specific you would like me to look at. Otherwise I'll probably look if I can fix any of the open issues. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331463020 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; +import org.apache.camel.quarkus.core.deployment.CamelSupport; +import org.jboss.jandex.IndexView; + +public class SubstrateProcessor { Review comment: There is `org.apache.camel.quarkus.main.deployment.BuildProcessor` and `org.apache.camel.quarkus.main.deployment.SubstrateProcessor`. Both contain build steps and it is not clear to me what would be the criteria to decide for the current and future build steps to decide into which one they belong? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] jacobborella commented on issue #982: Build operator image from non-Linux local OS
jacobborella commented on issue #982: Build operator image from non-Linux local OS URL: https://github.com/apache/camel-k/issues/982#issuecomment-538365139 I did the following make clean make cp kamel /usr/local/bin/kamel make images GOOS=linux make build-kamel cp kamel build/_output/bin/ operator-sdk build docker.io/apache/camel-k:1.0.0-M2-SNAPSHOT kamel install and then it worked. Thanks a lot for your help. I'll now get started getting more acquainted with the project. Let me know if there's anything specific you would like med to look at. Otherwise I'll probably look if I can fix any of the open issues. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #982: Build operator image from non-Linux local OS
astefanutti commented on issue #982: Build operator image from non-Linux local OS URL: https://github.com/apache/camel-k/issues/982#issuecomment-538359310 Ideally, the `kamel` binary produced for the Linux OS and added to the image should not override the local OS binary. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #982: Operator fails on minikube
astefanutti commented on issue #982: Operator fails on minikube URL: https://github.com/apache/camel-k/issues/982#issuecomment-538358775 Ah, it's too wide so the test binaries target the Linux OS too. We're going to fix it as suggested by @nicolaferraro. In the meatime, you can do: ``` GOOS=linux make build-kamel cp kamel build/_output/bin/ operator-sdk build docker.io/apache/camel-k:1.0.0-M2-SNAPSHOT ``` To build the image locally for Linux. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] jacobborella edited a comment on issue #982: Operator fails on minikube
jacobborella edited a comment on issue #982: Operator fails on minikube URL: https://github.com/apache/camel-k/issues/982#issuecomment-538356955 Thx for the quick reply. It makes sense - and yes, I'm on a mac. If I execute `GOOS=linux make images` the build fails though. I'm reading through the cross compilation section of the go manual and I see that I also have to provide GOARCH=amd64. The build still fails though `env GOOS=linux GOARCH=amd64 make images` give ``` $ env GOOS=linux GOARCH=amd64 make images go build -ldflags "-X github.com/apache/camel-k/pkg/cmd/operator.GitCommit=6f0da195533b1b848388493a0529d11db54855ad" -gcflags=-trimpath=/Users/jacobborella/go -asmflags=-trimpath=/Users/jacobborella/go -o kamel ./cmd/kamel/*.go go test -c -tags="integration knative" ./e2e/*.go go test ./... ?github.com/apache/camel-k/cmd/kamel [no test files] ?github.com/apache/camel-k/cmd/util/json-schema-gen [no test files] ?github.com/apache/camel-k/deploy[no test files] ?github.com/apache/camel-k/pkg/apis [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b718/v1alpha1.test: exec format error FAIL github.com/apache/camel-k/pkg/apis/camel/v1alpha1 0.007s ?github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative [no test files] ?github.com/apache/camel-k/pkg/apis/knative08compat [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b722/builder.test: exec format error FAIL github.com/apache/camel-k/pkg/builder 0.010s ?github.com/apache/camel-k/pkg/builder/kaniko[no test files] ?github.com/apache/camel-k/pkg/builder/s2i [no test files] ?github.com/apache/camel-k/pkg/client[no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b725/cmd.test: exec format error FAIL github.com/apache/camel-k/pkg/cmd 0.015s ?github.com/apache/camel-k/pkg/cmd/builder [no test files] ?github.com/apache/camel-k/pkg/cmd/operator [no test files] ?github.com/apache/camel-k/pkg/controller[no test files] ?github.com/apache/camel-k/pkg/controller/build [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b728/integration.test: exec format error FAIL github.com/apache/camel-k/pkg/controller/integration0.009s ?github.com/apache/camel-k/pkg/controller/integrationkit [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b731/integrationplatform.test: exec format error FAIL github.com/apache/camel-k/pkg/controller/integrationplatform0.026s fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b734/gzip.test: exec format error FAIL github.com/apache/camel-k/pkg/gzip 0.006s ?github.com/apache/camel-k/pkg/install [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b737/metadata.test: exec format error FAIL github.com/apache/camel-k/pkg/metadata 0.006s ?github.com/apache/camel-k/pkg/platform [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b740/trait.test: exec format error FAIL github.com/apache/camel-k/pkg/trait 0.005s ?github.com/apache/camel-k/pkg/util [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b743/camel.test: exec format error FAIL github.com/apache/camel-k/pkg/util/camel0.011s ?github.com/apache/camel-k/pkg/util/cancellable [no test files] ?github.com/apache/camel-k/pkg/util/defaults [no test files] ?github.com/apache/camel-k/pkg/util/digest [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b746/envvar.test: exec format error FAIL github.com/apache/camel-k/pkg/util/envvar 0.007s ?github.com/apache/camel-k/pkg/util/finalizer[no test files] ?github.com/apache/camel-k/pkg/util/indentedwriter [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b749/knative.test: exec format error FAIL github.com/apache/camel-k/pkg/util/knative 0.005s fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b752/kubernetes.test: exec format error FAIL github.com/apache/camel-k/pkg/util/kubernetes 0.005s ?github.com/apache/camel-k/pkg/util/kubernetes/customclient [no test files] ?github.com/apache/camel-k/pkg/util/kubernetes/log [no test files] ?github.com/apache/camel-k/pkg/util/log [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b755/maven.test: exec format error FAIL
[GitHub] [camel-k] jacobborella commented on issue #982: Operator fails on minikube
jacobborella commented on issue #982: Operator fails on minikube URL: https://github.com/apache/camel-k/issues/982#issuecomment-538356955 Thx for the quick reply. It makes sense - and yes, I'm on a mac. If I execute `GOOS=linux make images` the build fails though. I'm reading through the cross compilation section of the go manual and I see that I also have to provide GOARCH=amd64. The build still fails though `env GOOS=linux GOARCH=amd64 make images` give $ env GOOS=linux GOARCH=amd64 make images go build -ldflags "-X github.com/apache/camel-k/pkg/cmd/operator.GitCommit=6f0da195533b1b848388493a0529d11db54855ad" -gcflags=-trimpath=/Users/jacobborella/go -asmflags=-trimpath=/Users/jacobborella/go -o kamel ./cmd/kamel/*.go go test -c -tags="integration knative" ./e2e/*.go go test ./... ?github.com/apache/camel-k/cmd/kamel [no test files] ?github.com/apache/camel-k/cmd/util/json-schema-gen [no test files] ?github.com/apache/camel-k/deploy[no test files] ?github.com/apache/camel-k/pkg/apis [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b718/v1alpha1.test: exec format error FAIL github.com/apache/camel-k/pkg/apis/camel/v1alpha1 0.007s ?github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative [no test files] ?github.com/apache/camel-k/pkg/apis/knative08compat [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b722/builder.test: exec format error FAIL github.com/apache/camel-k/pkg/builder 0.010s ?github.com/apache/camel-k/pkg/builder/kaniko[no test files] ?github.com/apache/camel-k/pkg/builder/s2i [no test files] ?github.com/apache/camel-k/pkg/client[no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b725/cmd.test: exec format error FAIL github.com/apache/camel-k/pkg/cmd 0.015s ?github.com/apache/camel-k/pkg/cmd/builder [no test files] ?github.com/apache/camel-k/pkg/cmd/operator [no test files] ?github.com/apache/camel-k/pkg/controller[no test files] ?github.com/apache/camel-k/pkg/controller/build [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b728/integration.test: exec format error FAIL github.com/apache/camel-k/pkg/controller/integration0.009s ?github.com/apache/camel-k/pkg/controller/integrationkit [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b731/integrationplatform.test: exec format error FAIL github.com/apache/camel-k/pkg/controller/integrationplatform0.026s fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b734/gzip.test: exec format error FAIL github.com/apache/camel-k/pkg/gzip 0.006s ?github.com/apache/camel-k/pkg/install [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b737/metadata.test: exec format error FAIL github.com/apache/camel-k/pkg/metadata 0.006s ?github.com/apache/camel-k/pkg/platform [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b740/trait.test: exec format error FAIL github.com/apache/camel-k/pkg/trait 0.005s ?github.com/apache/camel-k/pkg/util [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b743/camel.test: exec format error FAIL github.com/apache/camel-k/pkg/util/camel0.011s ?github.com/apache/camel-k/pkg/util/cancellable [no test files] ?github.com/apache/camel-k/pkg/util/defaults [no test files] ?github.com/apache/camel-k/pkg/util/digest [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b746/envvar.test: exec format error FAIL github.com/apache/camel-k/pkg/util/envvar 0.007s ?github.com/apache/camel-k/pkg/util/finalizer[no test files] ?github.com/apache/camel-k/pkg/util/indentedwriter [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b749/knative.test: exec format error FAIL github.com/apache/camel-k/pkg/util/knative 0.005s fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b752/kubernetes.test: exec format error FAIL github.com/apache/camel-k/pkg/util/kubernetes 0.005s ?github.com/apache/camel-k/pkg/util/kubernetes/customclient [no test files] ?github.com/apache/camel-k/pkg/util/kubernetes/log [no test files] ?github.com/apache/camel-k/pkg/util/log [no test files] fork/exec /var/folders/p3/lt9l79r51cz7d43q98xp1kv0gn/T/go-build838360257/b755/maven.test: exec format error FAIL
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331444759 ## File path: extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java ## @@ -30,25 +37,45 @@ @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) -.addClasses(Routes.class) -.addAsResource(new StringAsset( -"quarkus.camel.servlet.url-patterns=/*\n" -+ "quarkus.camel.servlet.servlet-name=my-named-servlet\n" -+ "quarkus.camel.servlet.servlet-class=" + CustomServlet.class.getName() + "\n"), -"application.properties")); +.addAsResource(applicationProperties(), "application.properties")); @Test -public void customDefaultServletClass() { -RestAssured.when().get("/custom").then() -.body(IsEqual.equalTo("GET: /custom")) -.and().header("x-servlet-class-name", CustomServlet.class.getName()); +public void customDefaultServletClass() throws Exception { +DefaultCamelContext context = new DefaultCamelContext(); +context.addRoutes(new Routes()); +context.start(); Review comment: Why do we have to do this manually now? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331430871 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEvents.java ## @@ -14,8 +14,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.main; -public class InitializingEvent { +public final class CamelMainEvents { Review comment: Each of this events should be documented: * Who is firing it? * Start/Stop of what? * Any other the users should know? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331451470 ## File path: integration-tests/pom.xml ## @@ -80,7 +80,8 @@ core core-impl -core-cdi + Review comment: This commented line can perhaps be removed? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331428228 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/support/CamelMainListenerBuildItem.java ## @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment.support; + +import io.quarkus.builder.item.MultiBuildItem; +import org.apache.camel.main.MainListener; + +public final class CamelMainListenerBuildItem extends MultiBuildItem { Review comment: ```suggestion /** * A {@link MultiBuildItem} holding {@link MainListener}s to add to {@link CamelMain}. */ public final class CamelMainListenerBuildItem extends MultiBuildItem { ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331431979 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java ## @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main; + +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; +import io.quarkus.runtime.RuntimeValue; +import io.quarkus.runtime.ShutdownContext; +import io.quarkus.runtime.annotations.Recorder; +import org.apache.camel.CamelContext; +import org.apache.camel.main.MainListener; + +@Recorder +public class CamelMainRecorder { +public RuntimeValue create(RuntimeValue runtime, BeanContainer container) { Review comment: I vote for renaming to `createCamelMain` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331441711 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java ## @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main; + +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; +import io.quarkus.runtime.RuntimeValue; +import io.quarkus.runtime.ShutdownContext; +import io.quarkus.runtime.annotations.Recorder; +import org.apache.camel.CamelContext; +import org.apache.camel.main.MainListener; + +@Recorder +public class CamelMainRecorder { +public RuntimeValue create(RuntimeValue runtime, BeanContainer container) { +CamelMain main = new CamelMain(); +main.setCamelContext(runtime.getValue()); +main.disableHangupSupport(); +main.addMainListener(new CamelMainEventDispatcher()); + +// register to the container +container.instance(CamelMainProducers.class).setMain(main); + +return new RuntimeValue<>(main); +} + +public void addRouteBuilder( +RuntimeValue main, +String className) { +try { +main.getValue().addRouteBuilder(Class.forName(className)); +} catch (Exception e) { +throw new RuntimeException(e); Review comment: ```suggestion throw new RuntimeException("Could not add route builder '" + className + "'", e); ``` Might produce a more useful message in case there is a problem with a specific route builder out of many. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331430098 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEvents.java ## @@ -14,8 +14,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.main; -public class InitializingEvent { +public final class CamelMainEvents { +private CamelMainEvents() { +} +public static class BeforeStart { +} + +public static class Configure { +} + +public static class AsfterStart { +} + +public static class BeforeStop { +} + +public static class AsfterStop { Review comment: `s/AsfterStop/AfterStop/` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331446991 ## File path: integration-tests/aws/pom.xml ## @@ -30,6 +30,10 @@ The camel integration tests + +org.apache.camel.quarkus +camel-quarkus-main + Review comment: Do we really want end users to have to depend on `camel-quarkus-main` directly in addition to the endpoint extensions they want to use? It spontaneously looks like an unnecessary complication to me. Shouldn't our endpoint extensions better depend on `camel-quarkus-main`? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331442901 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java ## @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main; + +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; +import io.quarkus.runtime.RuntimeValue; +import io.quarkus.runtime.ShutdownContext; +import io.quarkus.runtime.annotations.Recorder; +import org.apache.camel.CamelContext; +import org.apache.camel.main.MainListener; + +@Recorder +public class CamelMainRecorder { +public RuntimeValue create(RuntimeValue runtime, BeanContainer container) { +CamelMain main = new CamelMain(); +main.setCamelContext(runtime.getValue()); +main.disableHangupSupport(); +main.addMainListener(new CamelMainEventDispatcher()); + +// register to the container +container.instance(CamelMainProducers.class).setMain(main); + +return new RuntimeValue<>(main); +} + +public void addRouteBuilder( +RuntimeValue main, +String className) { +try { +main.getValue().addRouteBuilder(Class.forName(className)); +} catch (Exception e) { +throw new RuntimeException(e); +} +} + +public void addListener(RuntimeValue main, MainListener listener) { +main.getValue().addMainListener(listener); +} + +public void start(ShutdownContext shutdown, RuntimeValue main) { +shutdown.addShutdownTask(new Runnable() { +@Override +public void run() { +try { +main.getValue().stop(); +} catch (Exception e) { +throw new RuntimeException(e); +} +} +}); + +try { +main.getValue().init(); +main.getValue().start(); +} catch (Exception e) { +throw new RuntimeException(e); +} +} + +public Supplier mainSupplier(RuntimeValue main) { Review comment: What is the purpose of this method? I do not see it used anywhere. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331429745 ## File path: integration-tests/main/runtime/src/main/java/org/apache/camel/quarkus/main/support/SupportRecorder.java ## @@ -14,8 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.main.support; -public class StartingEvent { +import io.quarkus.runtime.annotations.Recorder; +@Recorder +public class SupportRecorder { Review comment: It looks like this class can be removed? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331431429 ## File path: extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainProducers.java ## @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main; + +import javax.enterprise.inject.Produces; +import javax.inject.Singleton; + +@Singleton +public class CamelMainProducers { +private CamelMain main; Review comment: `volatile` maybe? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] nicolaferraro commented on issue #982: Operator fails on minikube
nicolaferraro commented on issue #982: Operator fails on minikube URL: https://github.com/apache/camel-k/issues/982#issuecomment-538355127 Yeah, maybe we can embed that in the scripts for only when doing `make mages`. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #226: Use MainSupport as base for running Camel
lburgazzoli commented on issue #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#issuecomment-538349784 @ppalaga fixed your findings, at least, I think :) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331443049 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { +FastCamelContext context = new FastCamelContext(); +context.setRegistry(registry.getValue()); +context.setLoadTypeConverters(false); +context.getTypeConverterRegistry().setInjector(context.getInjector()); -runtime.getValue().start(runtimeConfig); - -//in development mode undertow is started eagerly -shutdown.addShutdownTask(new Runnable() { -@Override -public void run() { -try { -runtime.getValue().stop(); -} catch (Exception e) { -throw new RuntimeException(e); +try { +if (buildTimeConfig.disableJaxb) { + context.adapt(ExtendedCamelContext.class).setModelJAXBContextFactory(() -> { +throw new UnsupportedOperationException(); +}); +} else { +// The creation of the JAXB context is very time consuming, so always prepare it +// when running in native mode, but lazy create it in java mode so that we don't +// waste time if using java routes +if (ImageInfo.inImageBuildtimeCode()) { + context.adapt(ExtendedCamelContext.class).getModelJAXBContextFactory().newJAXBContext(); } } -}); -} +} catch (Exception e) { +throw RuntimeCamelException.wrapRuntimeCamelException(e); +} -public void addBuilder( -RuntimeValue runtime, -String className) { +FastModel model = new FastModel(context); -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); +context.setModel(model); +context.init(); -try { -fcr.getBuilders().add((RoutesBuilder) Class.forName(className).newInstance()); -} catch (Exception e) { -throw new RuntimeException(e); -} +// register to the container +beanContainer.instance(CamelProducers.class).setContext(context); + +return new RuntimeValue<>(context); } public void bind( -RuntimeValue runtime, +RuntimeValue runtime, String name, Class type, Object instance) { -runtime.getValue().getRegistry().bind(name, type, instance); +runtime.getValue().bind(name, type, instance); } public void bind( -RuntimeValue runtime, +RuntimeValue runtime, String name, Class type) { try { -runtime.getValue().getRegistry().bind(name, type, type.newInstance()); +runtime.getValue().bind(name, type, type.newInstance()); } catch (Exception e) { throw new RuntimeException(e); } } -public BeanContainerListener initRuntimeInjection(RuntimeValue runtime) { -
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331443025 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { +FastCamelContext context = new FastCamelContext(); +context.setRegistry(registry.getValue()); +context.setLoadTypeConverters(false); +context.getTypeConverterRegistry().setInjector(context.getInjector()); -runtime.getValue().start(runtimeConfig); - -//in development mode undertow is started eagerly -shutdown.addShutdownTask(new Runnable() { -@Override -public void run() { -try { -runtime.getValue().stop(); -} catch (Exception e) { -throw new RuntimeException(e); +try { +if (buildTimeConfig.disableJaxb) { + context.adapt(ExtendedCamelContext.class).setModelJAXBContextFactory(() -> { +throw new UnsupportedOperationException(); +}); +} else { +// The creation of the JAXB context is very time consuming, so always prepare it +// when running in native mode, but lazy create it in java mode so that we don't +// waste time if using java routes +if (ImageInfo.inImageBuildtimeCode()) { + context.adapt(ExtendedCamelContext.class).getModelJAXBContextFactory().newJAXBContext(); } } -}); -} +} catch (Exception e) { +throw RuntimeCamelException.wrapRuntimeCamelException(e); +} -public void addBuilder( -RuntimeValue runtime, -String className) { +FastModel model = new FastModel(context); -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); +context.setModel(model); +context.init(); -try { -fcr.getBuilders().add((RoutesBuilder) Class.forName(className).newInstance()); -} catch (Exception e) { -throw new RuntimeException(e); -} +// register to the container +beanContainer.instance(CamelProducers.class).setContext(context); + +return new RuntimeValue<>(context); } public void bind( -RuntimeValue runtime, +RuntimeValue runtime, String name, Class type, Object instance) { -runtime.getValue().getRegistry().bind(name, type, instance); +runtime.getValue().bind(name, type, instance); } public void bind( -RuntimeValue runtime, +RuntimeValue runtime, String name, Class type) { try { -runtime.getValue().getRegistry().bind(name, type, type.newInstance()); +runtime.getValue().bind(name, type, type.newInstance()); } catch (Exception e) { throw new RuntimeException(e); } } -public BeanContainerListener initRuntimeInjection(RuntimeValue runtime) { -
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331442824 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java ## @@ -16,88 +16,98 @@ */ package org.apache.camel.quarkus.core.runtime; -import io.quarkus.arc.runtime.BeanContainerListener; +import java.util.function.Supplier; + +import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.RoutesBuilder; -import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime; +import org.apache.camel.CamelContext; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; +import org.apache.camel.quarkus.core.runtime.support.FastModel; +import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; +import org.graalvm.nativeimage.ImageInfo; @Recorder public class CamelRecorder { -public RuntimeValue create(Registry registry) { - -FastCamelRuntime fcr = new FastCamelRuntime(); -fcr.setRegistry(registry); - -return new RuntimeValue<>(fcr); -} - -public void init( -RuntimeValue runtime, -CamelConfig.BuildTime buildTimeConfig) { - -FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue(); -fcr.init(buildTimeConfig); +public RuntimeValue createRegistry() { +return new RuntimeValue<>(new RuntimeRegistry()); } -public void start( -ShutdownContext shutdown, -RuntimeValue runtime, -CamelConfig.Runtime runtimeConfig) throws Exception { +@SuppressWarnings("unchecked") +public RuntimeValue createContext(RuntimeValue registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) { Review comment: I don't think we need to explicit the phase here as for the recorder POV, it does not matter. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331431933 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/support/CamelMainBuildItem.java ## @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment.support; + +import io.quarkus.builder.item.SimpleBuildItem; +import io.quarkus.runtime.RuntimeValue; +import org.apache.camel.quarkus.main.CamelMain; + +public final class CamelMainBuildItem extends SimpleBuildItem { Review comment: they don't need to be separate, probably a leftover of something I was working on 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331431643 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; +import org.apache.camel.quarkus.core.deployment.CamelSupport; +import org.jboss.jandex.IndexView; + +public class SubstrateProcessor { Review comment: what do you mean by two processors ? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel
lburgazzoli commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331430884 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java ## @@ -16,51 +16,41 @@ */ package org.apache.camel.quarkus.core.runtime; -import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; +import javax.inject.Singleton; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.ProducerTemplate; import org.apache.camel.spi.Registry; -@ApplicationScoped +@Singleton public class CamelProducers { +private CamelContext context; Review comment: this is set by a recorder, don't know if make any difference 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti commented on issue #982: Operator fails on minikube
astefanutti commented on issue #982: Operator fails on minikube URL: https://github.com/apache/camel-k/issues/982#issuecomment-538332457 The `exec user process caused "exec format error"` happens when you've built the operator binary on another platform than the Linux one, which is the target platform when running in Minikube. I assume you're on another platform than Linux, so you can do: ``` $ GOOS=linux make images ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331405269 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java ## @@ -16,51 +16,41 @@ */ package org.apache.camel.quarkus.core.runtime; -import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; +import javax.inject.Singleton; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.ProducerTemplate; import org.apache.camel.spi.Registry; -@ApplicationScoped +@Singleton Review comment: ```suggestion /** * Producers of beans that are injectable via CDI. */ @Singleton ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331393176 ## File path: extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java ## @@ -67,151 +47,57 @@ @Record(ExecutionTime.STATIC_INIT) @BuildStep -CamelRuntimeBuildItem create( +CamelRegistryBuildItem registry( CamelRecorder recorder, -List camelBeans, -BuildProducer runtimeBeans) { +List registryItems) { -RuntimeRegistry registry = new RuntimeRegistry(); -RuntimeValue camelRuntime = recorder.create(registry); +RuntimeValue registry = recorder.createRegistry(); -getBuildTimeRouteBuilderClasses().forEach( -b -> recorder.addBuilder(camelRuntime, b) -); - -services().filter( -si -> camelBeans.stream().noneMatch( +CamelSupport.services(applicationArchivesBuildItem).filter( +si -> registryItems.stream().noneMatch( c -> Objects.equals(si.name, c.getName()) && c.getType().isAssignableFrom(si.type) ) ).forEach( si -> { LOGGER.debug("Binding camel service {} with type {}", si.name, si.type); recorder.bind( -camelRuntime, +registry, si.name, si.type ); } ); -for (CamelBeanBuildItem item: camelBeans) { +for (CamelBeanBuildItem item: registryItems) { LOGGER.debug("Binding item with name: {}, type {}", item.getName(), item.getType()); recorder.bind( -camelRuntime, +registry, item.getName(), item.getType(), item.getValue() ); } - runtimeBeans.produce(RuntimeBeanBuildItem.builder(CamelRuntime.class).setRuntimeValue(camelRuntime).build()); - -return new CamelRuntimeBuildItem(camelRuntime); +return new CamelRegistryBuildItem(registry); } @Record(ExecutionTime.STATIC_INIT) @BuildStep -AdditionalBeanBuildItem createProducers( -CamelRuntimeBuildItem runtime, +CamelContextBuildItem context( CamelRecorder recorder, -BuildProducer listeners) { - -listeners.produce(new BeanContainerListenerBuildItem(recorder.initRuntimeInjection(runtime.getRuntime(; - -return AdditionalBeanBuildItem.unremovableOf(CamelProducers.class); -} - -@Record(ExecutionTime.STATIC_INIT) -@BuildStep -void init( -// TODO: keep this field as we need to be sure ArC is initialized before starting events -// We need to re-evaluate the need of fire events from context once doing -// https://github.com/apache/camel-quarkus/issues/9 +CamelRegistryBuildItem registry, +// TODO: this add a dependency on Arc BeanContainerBuildItem beanContainerBuildItem, Review comment: I like that you use the param names without the `BuildItem` suffix elsewhere. You may want to rename also `beanContainerBuildItem` when you go around next time. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331422708 ## File path: extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/support/CamelMainBuildItem.java ## @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.main.deployment.support; + +import io.quarkus.builder.item.SimpleBuildItem; +import io.quarkus.runtime.RuntimeValue; +import org.apache.camel.quarkus.main.CamelMain; + +public final class CamelMainBuildItem extends SimpleBuildItem { Review comment: ```suggestion /** * Holds the {@link CamelMain} {@link RuntimeValue}. */ public final class CamelMainBuildItem extends SimpleBuildItem { ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331403147 ## File path: extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSupport.java ## @@ -56,4 +69,67 @@ public static boolean isPublic(ClassInfo ci) { .flatMap(CamelSupport::safeWalk) .filter(Files::isRegularFile); } + +public static Stream getRouteBuilderClasses(IndexView view) { +Set allKnownImplementors = new HashSet<>(); +allKnownImplementors.addAll( + view.getAllKnownImplementors(DotName.createSimple(RoutesBuilder.class.getName(; +allKnownImplementors.addAll( + view.getAllKnownSubclasses(DotName.createSimple(RouteBuilder.class.getName(; +allKnownImplementors.addAll( + view.getAllKnownSubclasses(DotName.createSimple(AdviceWithRouteBuilder.class.getName(; + +return allKnownImplementors +.stream() +.filter(CamelSupport::isConcrete) +.filter(CamelSupport::isPublic) +.map(ClassInfo::toString); +} + +public static Stream services(ApplicationArchivesBuildItem applicationArchivesBuildItem) { +return CamelSupport.resources(applicationArchivesBuildItem, CamelSupport.CAMEL_SERVICE_BASE_PATH) +.map(CamelSupport::services) +.flatMap(Collection::stream); +} + +private static List services(Path p) { +List answer = new ArrayList<>(); + +String name = p.getFileName().toString(); +try (InputStream is = Files.newInputStream(p)) { +Properties props = new Properties(); +props.load(is); +for (Map.Entry entry : props.entrySet()) { +String k = entry.getKey().toString(); +if (k.equals("class")) { +String clazz = entry.getValue().toString(); +Class cl = Class.forName(clazz); + +answer.add(new ServiceInfo(name, cl)); +} +} +} catch (Exception e) { +throw new RuntimeException(e); +} + +return answer; +} + +public static class ServiceInfo { Review comment: JavaDoc please. A noun phrase would be enoungh. Something like `A description/metadata/identifier? of a Camel Service (typically found in {@code META-INF/services/org/apache/camel} of a jar?)` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel
ppalaga commented on a change in pull request #226: Use MainSupport as base for running Camel URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331404413 ## File path: extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java ## @@ -16,51 +16,41 @@ */ package org.apache.camel.quarkus.core.runtime; -import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; +import javax.inject.Singleton; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.ProducerTemplate; import org.apache.camel.spi.Registry; -@ApplicationScoped +@Singleton public class CamelProducers { +private CamelContext context; Review comment: IRC, CDI does not care for synchronization in any way. Shouldn't this be `volatile`? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services