(camel-spring-boot) branch main updated (e84b692d26c -> 7595b94113c)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git from e84b692d26c Regen new 54b48a87a19 Regen new 7595b94113c Add camel-kotlin-api to SB starter The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/camel/springboot/catalog/others.properties | 1 + .../catalog/others/{kotlin-dsl.json => kotlin-api.json}| 10 +- .../{camel-js-dsl-starter => camel-kotlin-api-starter}/pom.xml | 8 dsl-starter/pom.xml| 1 + tooling/camel-spring-boot-dependencies/pom.xml | 5 + 5 files changed, 16 insertions(+), 9 deletions(-) copy catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/{kotlin-dsl.json => kotlin-api.json} (53%) copy dsl-starter/{camel-js-dsl-starter => camel-kotlin-api-starter}/pom.xml (88%)
(camel-spring-boot) 01/02: Regen
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git commit 54b48a87a19503bd68949786f27f0bcfc64565b2 Author: Claus Ibsen AuthorDate: Sun Feb 11 08:31:21 2024 +0100 Regen --- tooling/camel-spring-boot-dependencies/pom.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml index 797df8585ed..eededa7fadd 100644 --- a/tooling/camel-spring-boot-dependencies/pom.xml +++ b/tooling/camel-spring-boot-dependencies/pom.xml @@ -3219,6 +3219,11 @@ camel-knative-http 4.4.0-SNAPSHOT + +org.apache.camel +camel-kotlin-api +4.4.0-SNAPSHOT + org.apache.camel camel-kotlin-dsl
(camel-spring-boot) 02/02: Add camel-kotlin-api to SB starter
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git commit 7595b94113c4a66c565fe2814414fe9d981c6705 Author: Claus Ibsen AuthorDate: Sun Feb 11 08:33:56 2024 +0100 Add camel-kotlin-api to SB starter --- .../camel/springboot/catalog/others.properties | 1 + .../springboot/catalog/others/kotlin-api.json | 15 +++ dsl-starter/camel-kotlin-api-starter/pom.xml | 48 ++ dsl-starter/pom.xml| 1 + 4 files changed, 65 insertions(+) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties index 7e33c529ea6..fd7ad79eeea 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties @@ -15,6 +15,7 @@ java-joor-dsl jfr js-dsl jsh-dsl +kotlin-api kotlin-dsl leveldb lra diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-api.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-api.json new file mode 100644 index 000..bfe1b35088a --- /dev/null +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-api.json @@ -0,0 +1,15 @@ +{ + "other": { +"kind": "other", +"name": "kotlin-api", +"title": "Kotlin API", +"description": "Camel Kotlin API", +"deprecated": false, +"firstVersion": "4.4.0", +"label": "dsl", +"supportLevel": "Experimental", +"groupId": "org.apache.camel.springboot", +"artifactId": "camel-kotlin-api-starter", +"version": "4.4.0-SNAPSHOT" + } +} diff --git a/dsl-starter/camel-kotlin-api-starter/pom.xml b/dsl-starter/camel-kotlin-api-starter/pom.xml new file mode 100644 index 000..25762643608 --- /dev/null +++ b/dsl-starter/camel-kotlin-api-starter/pom.xml @@ -0,0 +1,48 @@ + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> + +4.0.0 + + +org.apache.camel.springboot +dsl-starter +4.4.0-SNAPSHOT +../pom.xml + + +camel-kotlin-api-starter +jar +Camel SB DSL Starters :: Kotlin API +Spring-Boot Starter for Camel DSL :: Kotlin API + + + +org.springframework.boot +spring-boot-starter +${spring-boot-version} + + +org.apache.camel +camel-kotlin-api +${camel-version} + + + \ No newline at end of file diff --git a/dsl-starter/pom.xml b/dsl-starter/pom.xml index 2045bfdc773..7b02560c3b1 100644 --- a/dsl-starter/pom.xml +++ b/dsl-starter/pom.xml @@ -42,6 +42,7 @@ camel-java-joor-dsl-starter camel-js-dsl-starter camel-jsh-dsl-starter +camel-kotlin-api-starter camel-kotlin-dsl-starter camel-xml-io-dsl-starter camel-xml-jaxb-dsl-starter
(camel) branch regen_bot updated (144d836ee8e -> 028d717fea7)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 144d836ee8e Route scoped variables (#13086) add 028d717fea7 CAMEL-20384: Modernize map operations (#13081) No new revisions were added by this update. Summary of changes: .../camel/language/joor/CompilationUnit.java | 8 ++--- .../camel/component/olingo4/Olingo4Endpoint.java | 19 ++- .../camel/component/xchange/XChangeComponent.java | 10 ++ .../camel/impl/engine/CamelInternalProcessor.java | 4 +-- .../engine/DefaultRuntimeEndpointRegistry.java | 4 +-- .../camel/language/csimple/CSimpleLanguage.java| 38 +- .../injection/AnnotationDependencyInjection.java | 19 ++- 7 files changed, 46 insertions(+), 56 deletions(-)
(camel) branch main updated: CAMEL-20384: Modernize map operations (#13081)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 028d717fea7 CAMEL-20384: Modernize map operations (#13081) 028d717fea7 is described below commit 028d717fea732e46726a82fdc7717ade7b46681f Author: Brice Frisco <39070938+bricefri...@users.noreply.github.com> AuthorDate: Sun Feb 11 01:26:02 2024 -0600 CAMEL-20384: Modernize map operations (#13081) --- .../camel/language/joor/CompilationUnit.java | 8 ++--- .../camel/component/olingo4/Olingo4Endpoint.java | 19 ++- .../camel/component/xchange/XChangeComponent.java | 10 ++ .../camel/impl/engine/CamelInternalProcessor.java | 4 +-- .../engine/DefaultRuntimeEndpointRegistry.java | 4 +-- .../camel/language/csimple/CSimpleLanguage.java| 38 +- .../injection/AnnotationDependencyInjection.java | 19 ++- 7 files changed, 46 insertions(+), 56 deletions(-) diff --git a/components/camel-joor/src/main/java/org/apache/camel/language/joor/CompilationUnit.java b/components/camel-joor/src/main/java/org/apache/camel/language/joor/CompilationUnit.java index 64fd9bfc56f..28a32fa1e1b 100644 --- a/components/camel-joor/src/main/java/org/apache/camel/language/joor/CompilationUnit.java +++ b/components/camel-joor/src/main/java/org/apache/camel/language/joor/CompilationUnit.java @@ -37,11 +37,11 @@ public class CompilationUnit { private final Map compiled = new LinkedHashMap<>(); void addResult(String className, Class clazz, byte[] byteCode) { -if (clazz != null && !classes.containsKey(className)) { -classes.put(className, clazz); +if (clazz != null) { +classes.putIfAbsent(className, clazz); } -if (byteCode != null && !compiled.containsKey(className)) { -compiled.put(className, byteCode); +if (byteCode != null) { +compiled.putIfAbsent(className, byteCode); } } diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java index 20972a7450e..cb153e7010e 100644 --- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java +++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java @@ -234,16 +234,17 @@ public class Olingo4Endpoint extends AbstractApiEndpoint { +if (resourcePath == null) { +throw new IllegalArgumentException( +"Resource path must be provided in endpoint URI, or URI parameter '" + RESOURCE_PATH_PROPERTY + + "', or exchange header '" + + Olingo4Constants.PROPERTY_PREFIX + RESOURCE_PATH_PROPERTY + "'"); +} -// append keyPredicate to dynamically create resource path -properties.put(RESOURCE_PATH_PROPERTY, resourcePath + '(' + keyPredicate + ')'); +// append keyPredicate to dynamically create resource path +return resourcePath + "(" + keyPredicate + ")"; +}); } // handle individual queryParams diff --git a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeComponent.java b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeComponent.java index 8983ce00267..f8b4f2200da 100644 --- a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeComponent.java +++ b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeComponent.java @@ -65,15 +65,11 @@ public class XChangeComponent extends DefaultComponent { } private synchronized XChange getOrCreateXChange(String name) { -XChange xchange = xchanges.get(name); -if (xchange == null) { +return xchanges.computeIfAbsent(name, xc -> { Class exchangeClass = XChangeHelper.loadXChangeClass(getCamelContext(), name); Assert.notNull(exchangeClass, "XChange not supported: " + name); -xchange = new XChange(createExchange(exchangeClass)); -xchanges.put(name, xchange); -} - -return xchange; +return new XChange(createExchange(exchangeClass)); +}); } } diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java index
Re: [PR] CAMEL-20384: Modernize map operations [camel]
davsclaus merged PR #13081: URL: https://github.com/apache/camel/pull/13081 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) [camel-spring-boot]
oscerd closed pull request #1085: [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) URL: https://github.com/apache/camel-spring-boot/pull/1085 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) [camel-spring-boot]
github-actions[bot] opened a new pull request, #1085: URL: https://github.com/apache/camel-spring-boot/pull/1085 Periodic Sync of Camel Spring Boot Main Branch with main Camel Main. see https://github.com/apache/camel-spring-boot/blob/main/.github/workflows/automatic-sync-main.yml -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel-karavan) branch main updated: Updates for #1115
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git The following commit(s) were added to refs/heads/main by this push: new 7bfe6bcf Updates for #1115 7bfe6bcf is described below commit 7bfe6bcf2dca09c603d5926e64c4249eda3ef851 Author: Marat Gubaidullin AuthorDate: Sat Feb 10 18:27:28 2024 -0500 Updates for #1115 --- .../java/org/apache/camel/karavan/cache/KaravanCacheService.java | 7 --- 1 file changed, 7 deletions(-) diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java index 438c7913..86cb1600 100644 --- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java +++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java @@ -28,7 +28,6 @@ import io.quarkus.runtime.ShutdownEvent; import io.quarkus.runtime.StartupEvent; import jakarta.enterprise.event.Observes; import jakarta.enterprise.inject.Default; -import jakarta.enterprise.inject.Produces; import jakarta.inject.Singleton; import org.apache.camel.karavan.cache.model.*; import org.jboss.logging.Logger; @@ -79,12 +78,6 @@ public class KaravanCacheService { ready.set(false); } -@Produces -HazelcastInstance createInstance() { -Config config = new ClasspathYamlConfig("hazelcast.yaml"); -return Hazelcast.getOrCreateHazelcastInstance(config); -} - public List getProjects() { return projects.values().stream().collect(Collectors.toList()); }
Re: [I] Embedded cache instead of external [camel-karavan]
mgubaidullin closed issue #1115: Embedded cache instead of external URL: https://github.com/apache/camel-karavan/issues/1115 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel-karavan) branch main updated (024e8723 -> 8a9a1e2d)
This is an automated email from the ASF dual-hosted git repository. marat pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git from 024e8723 Fix #564 new 5dd960a9 Remove outdated demos new 8a9a1e2d Fix #1054 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: karavan-demo/aggregator/Aggregator.java| 21 - karavan-demo/aggregator/aggregator.yaml| 27 - karavan-demo/aggregator/application.properties | 13 - karavan-demo/aggregator/file_src/1.txt |1 - karavan-demo/aggregator/file_src/2.txt |1 - karavan-demo/aggregator/file_src/3.txt |1 - karavan-demo/expose-pod-service/Readme.md | 12 - .../quarkus/Responseprocessor.java | 20 - .../quarkus/application.properties | 15 - .../quarkus/integration-yaml.camel.yaml| 14 - .../spring/Responseprocessor.java | 20 - .../spring/application.properties | 20 - .../spring/integration.camel.yaml | 15 - karavan-demo/hello-world/application.properties| 11 - karavan-demo/hello-world/hello-world.yaml | 10 - .../artemis/Dockerfile-adoptopenjdk-11 | 69 -- .../jms-to-kafka/artemis/Dockerfile-centos | 69 -- .../jms-to-kafka/artemis/Dockerfile-debian | 69 -- karavan-demo/jms-to-kafka/artemis/docker-run.sh| 49 - .../jms-to-kafka/artemis/prepare-docker.sh | 184 karavan-demo/jms-to-kafka/artemis/readme.md| 198 .../docker-compose/docker-compose.yaml | 40 - karavan-demo/jms-to-kafka/docker-compose/start.sh |7 - karavan-demo/jms-to-kafka/docs/README.md | 58 -- karavan-demo/jms-to-kafka/docs/payment.png | Bin 366631 -> 0 bytes karavan-demo/jms-to-kafka/project/payment.yaml | 18 - karavan-demo/openapi/open-api.json | 1093 .../parceldemo/artemis/Dockerfile-adoptopenjdk-11 | 69 -- karavan-demo/parceldemo/artemis/Dockerfile-centos | 69 -- karavan-demo/parceldemo/artemis/Dockerfile-debian | 69 -- karavan-demo/parceldemo/artemis/docker-run.sh | 49 - karavan-demo/parceldemo/artemis/prepare-docker.sh | 184 karavan-demo/parceldemo/artemis/readme.md | 198 .../parceldemo/docker-compose/docker-compose.yaml | 64 -- .../parceldemo/docker-compose/postgres_db.sql |6 - karavan-demo/parceldemo/docker-compose/start.sh|7 - karavan-demo/parceldemo/docs/README.md | 107 -- karavan-demo/parceldemo/docs/operators.png | Bin 96712 -> 0 bytes karavan-demo/parceldemo/docs/parcels.png | Bin 326798 -> 0 bytes .../openshift-manifests/instances/amq-broker.yaml | 48 - .../openshift-manifests/instances/amq-streams.yaml | 33 - .../instances/kustomization.yaml |6 - .../openshift-manifests/instances/postgresql.yaml | 168 --- .../operators/amq-operator.yaml| 11 - .../operators/amq-streams-operator.yaml| 13 - .../operators/kustomization.yaml |7 - .../operators/operator-group.yaml |7 - .../parceldemo/project/application.properties | 15 - karavan-demo/parceldemo/project/parceldemo.yaml| 133 --- karavan-demo/placeholder/application.properties| 33 - karavan-demo/placeholder/demo.yaml |9 - karavan-demo/placeholder/local.properties | 21 - .../rest-service/quarkus/CreateNewUser.java| 14 - .../rest-service/quarkus/DeleteUserById.java | 15 - karavan-demo/rest-service/quarkus/GetAllUsers.java | 16 - karavan-demo/rest-service/quarkus/GetUserById.java | 15 - karavan-demo/rest-service/quarkus/Readme.md| 11 - .../rest-service/quarkus/application.properties| 15 - karavan-demo/rest-service/quarkus/users.yaml | 78 -- karavan-vscode/CHANGELOG.md|7 + karavan-vscode/package.json| 10 +- .../snippets/docker-application.properties |4 +- .../snippets/kubernetes-application.properties |4 +- .../snippets/openshift-application.properties |4 +- 64 files changed, 18 insertions(+), 3556 deletions(-) delete mode 100644 karavan-demo/aggregator/Aggregator.java delete mode 100644 karavan-demo/aggregator/aggregator.yaml delete mode 100644 karavan-demo/aggregator/application.properties delete mode 100644 karavan-demo/aggregator/file_src/1.txt delete mode 100644 karavan-demo/aggregator/file_src/2.txt delete mode 100644 karavan-demo/aggregator/file_src/3.txt delete mode 100644
Re: [I] Issue while Deploying Karavan App using SB runtime [camel-karavan]
mgubaidullin closed issue #1054: Issue while Deploying Karavan App using SB runtime URL: https://github.com/apache/camel-karavan/issues/1054 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel-karavan) 02/02: Fix #1054
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git commit 8a9a1e2dd8281acbaa49b0df8f2a2054b878902d Author: Marat Gubaidullin AuthorDate: Sat Feb 10 18:21:38 2024 -0500 Fix #1054 --- karavan-vscode/CHANGELOG.md| 7 +++ karavan-vscode/package.json| 10 +- .../src/main/resources/snippets/docker-application.properties | 4 ++-- .../main/resources/snippets/kubernetes-application.properties | 4 ++-- .../main/resources/snippets/openshift-application.properties | 4 ++-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/karavan-vscode/CHANGELOG.md b/karavan-vscode/CHANGELOG.md index 250116c7..3de3a92d 100644 --- a/karavan-vscode/CHANGELOG.md +++ b/karavan-vscode/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 4.4.0 +0. Camel 4.4.0 +1. Camel-main Runtime +2. Kamelets 4.4.0 +3. Jkube 1.16.0 +4. JBang v0.114.0 + ## 4.3.0 0. Camel 4.3.0 1. Camel-main Runtime diff --git a/karavan-vscode/package.json b/karavan-vscode/package.json index 00743650..2ac85771 100644 --- a/karavan-vscode/package.json +++ b/karavan-vscode/package.json @@ -375,7 +375,7 @@ }, "default": [ "# jkube properties", -"jkube.version=1.15.0", +"jkube.version=1.16.0", "jkube.build.strategy=s2i", "jkube.namespace=${NAMESPACE}", "jkube.generator.name=image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/$NAME:${DATE}", @@ -396,7 +396,7 @@ }, "default": [ "# jkube properties", -"jkube.version=1.15.0", +"jkube.version=1.16.0", "jkube.build.strategy=s2i", "jkube.namespace=${NAMESPACE}", "jkube.generator.name=image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/$NAME:${DATE}", @@ -417,7 +417,7 @@ }, "default": [ "# jkube properties", -"jkube.version=1.15.0", +"jkube.version=1.16.0", "jkube.build.strategy=docker", "jkube.namespace=default", "jkube.generator.name=default/$NAME:${DATE}", @@ -439,9 +439,9 @@ "default": [ "# kubernetes properties", "label.runtime=app.kubernetes.io/runtime", - "jib.from.image=gcr.io/distroless/java17@sha256:3a4ea21bd7b412b8b6ae61313b39337d8f03bb6844013810e8e4625d8c765edb", + "jib.from.image=gcr.io/distroless/java17@sha256:85c2fa20773270fe6fecf576dd5a53f5bb8b914e57a463c533dac034c51862d9", "jib.to.image=default/$NAME:${DATE}", -"jkube.version=1.15.0", +"jkube.version=1.16.0", "jkube.skip.build=true", "jkube.build.strategy=jib", "jkube.namespace=default", diff --git a/karavan-web/karavan-app/src/main/resources/snippets/docker-application.properties b/karavan-web/karavan-app/src/main/resources/snippets/docker-application.properties index 79cfd326..085fd15b 100644 --- a/karavan-web/karavan-app/src/main/resources/snippets/docker-application.properties +++ b/karavan-web/karavan-app/src/main/resources/snippets/docker-application.properties @@ -19,5 +19,5 @@ camel.main.routeControllerThreadPoolSize = 3 camel.context.dev-console=true camel.health.enabled=true camel.health.exposure-level=full -jkube.version=1.15.0 -jib.from.image=gcr.io/distroless/java17@sha256:3a4ea21bd7b412b8b6ae61313b39337d8f03bb6844013810e8e4625d8c765edb +jkube.version=1.16.0 +jib.from.image=gcr.io/distroless/java17@sha256:85c2fa20773270fe6fecf576dd5a53f5bb8b914e57a463c533dac034c51862d9 diff --git a/karavan-web/karavan-app/src/main/resources/snippets/kubernetes-application.properties b/karavan-web/karavan-app/src/main/resources/snippets/kubernetes-application.properties index 17444d6f..6b152d57 100644 --- a/karavan-web/karavan-app/src/main/resources/snippets/kubernetes-application.properties +++ b/karavan-web/karavan-app/src/main/resources/snippets/kubernetes-application.properties @@ -20,8 +20,8 @@ camel.main.routeControllerInitialDelay = 1000 camel.main.routeControllerThreadPoolSize = 3 camel.context.dev-console=true label.runtime=app.kubernetes.io/runtime -jib.from.image=gcr.io/distroless/java17@sha256:3a4ea21bd7b412b8b6ae61313b39337d8f03bb6844013810e8e4625d8c765edb -jkube.version=1.15.0 +jib.from.image=gcr.io/distroless/java17@sha256:85c2fa20773270fe6fecf576dd5a53f5bb8b914e57a463c533dac034c51862d9 +jkube.version=1.16.0 jkube.skip.build=true jkube.namespace=default jkube.imagePullPolicy=IfNotPresent diff --git a/karavan-web/karavan-app/src/main/resources/snippets/openshift-application.properties b/karavan-web/karavan-app/src/main/resources/snippets/openshift-application.properties index 40ef6924..347f9f43 100644 ---
(camel-karavan) 01/02: Remove outdated demos
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git commit 5dd960a9987d74403bcacf2c12686e671617f937 Author: Marat Gubaidullin AuthorDate: Sat Feb 10 18:21:10 2024 -0500 Remove outdated demos --- karavan-demo/aggregator/Aggregator.java| 21 - karavan-demo/aggregator/aggregator.yaml| 27 - karavan-demo/aggregator/application.properties | 13 - karavan-demo/aggregator/file_src/1.txt |1 - karavan-demo/aggregator/file_src/2.txt |1 - karavan-demo/aggregator/file_src/3.txt |1 - karavan-demo/expose-pod-service/Readme.md | 12 - .../quarkus/Responseprocessor.java | 20 - .../quarkus/application.properties | 15 - .../quarkus/integration-yaml.camel.yaml| 14 - .../spring/Responseprocessor.java | 20 - .../spring/application.properties | 20 - .../spring/integration.camel.yaml | 15 - karavan-demo/hello-world/application.properties| 11 - karavan-demo/hello-world/hello-world.yaml | 10 - .../artemis/Dockerfile-adoptopenjdk-11 | 69 -- .../jms-to-kafka/artemis/Dockerfile-centos | 69 -- .../jms-to-kafka/artemis/Dockerfile-debian | 69 -- karavan-demo/jms-to-kafka/artemis/docker-run.sh| 49 - .../jms-to-kafka/artemis/prepare-docker.sh | 184 karavan-demo/jms-to-kafka/artemis/readme.md| 198 .../docker-compose/docker-compose.yaml | 40 - karavan-demo/jms-to-kafka/docker-compose/start.sh |7 - karavan-demo/jms-to-kafka/docs/README.md | 58 -- karavan-demo/jms-to-kafka/docs/payment.png | Bin 366631 -> 0 bytes karavan-demo/jms-to-kafka/project/payment.yaml | 18 - karavan-demo/openapi/open-api.json | 1093 .../parceldemo/artemis/Dockerfile-adoptopenjdk-11 | 69 -- karavan-demo/parceldemo/artemis/Dockerfile-centos | 69 -- karavan-demo/parceldemo/artemis/Dockerfile-debian | 69 -- karavan-demo/parceldemo/artemis/docker-run.sh | 49 - karavan-demo/parceldemo/artemis/prepare-docker.sh | 184 karavan-demo/parceldemo/artemis/readme.md | 198 .../parceldemo/docker-compose/docker-compose.yaml | 64 -- .../parceldemo/docker-compose/postgres_db.sql |6 - karavan-demo/parceldemo/docker-compose/start.sh|7 - karavan-demo/parceldemo/docs/README.md | 107 -- karavan-demo/parceldemo/docs/operators.png | Bin 96712 -> 0 bytes karavan-demo/parceldemo/docs/parcels.png | Bin 326798 -> 0 bytes .../openshift-manifests/instances/amq-broker.yaml | 48 - .../openshift-manifests/instances/amq-streams.yaml | 33 - .../instances/kustomization.yaml |6 - .../openshift-manifests/instances/postgresql.yaml | 168 --- .../operators/amq-operator.yaml| 11 - .../operators/amq-streams-operator.yaml| 13 - .../operators/kustomization.yaml |7 - .../operators/operator-group.yaml |7 - .../parceldemo/project/application.properties | 15 - karavan-demo/parceldemo/project/parceldemo.yaml| 133 --- karavan-demo/placeholder/application.properties| 33 - karavan-demo/placeholder/demo.yaml |9 - karavan-demo/placeholder/local.properties | 21 - .../rest-service/quarkus/CreateNewUser.java| 14 - .../rest-service/quarkus/DeleteUserById.java | 15 - karavan-demo/rest-service/quarkus/GetAllUsers.java | 16 - karavan-demo/rest-service/quarkus/GetUserById.java | 15 - karavan-demo/rest-service/quarkus/Readme.md| 11 - .../rest-service/quarkus/application.properties| 15 - karavan-demo/rest-service/quarkus/users.yaml | 78 -- 59 files changed, 3545 deletions(-) diff --git a/karavan-demo/aggregator/Aggregator.java b/karavan-demo/aggregator/Aggregator.java deleted file mode 100644 index 6182b729.. --- a/karavan-demo/aggregator/Aggregator.java +++ /dev/null @@ -1,21 +0,0 @@ -import org.apache.camel.BindToRegistry; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.Exchange; -import org.apache.camel.AggregationStrategy; -import java.util.ArrayList; - -@BindToRegistry("aggregator") -public class Aggregator implements AggregationStrategy { - -public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { -if (oldExchange == null) { -return newExchange; -} - -String oldBody = oldExchange.getIn().getBody(String.class); -String newBody = newExchange.getIn().getBody(String.class); -oldExchange.getIn().setBody(oldBody + "+" + newBody); -return oldExchange; -} -} \ No
(camel-karavan) 01/03: Split client api
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git commit c047c8438175a69d508c21bb4a8883a380e9b76a Author: Marat Gubaidullin AuthorDate: Fri Feb 9 17:59:22 2024 -0500 Split client api --- .../src/main/webui/src/api/KaravanApi.tsx | 34 - .../src/main/webui/src/api/LogWatchApi.tsx | 58 ++ .../src/main/webui/src/api/NotificationApi.tsx | 57 + .../main/webui/src/project/log/ProjectLogPanel.tsx | 3 +- 4 files changed, 117 insertions(+), 35 deletions(-) diff --git a/karavan-web/karavan-app/src/main/webui/src/api/KaravanApi.tsx b/karavan-web/karavan-app/src/main/webui/src/api/KaravanApi.tsx index 0e963238..2efbeeb6 100644 --- a/karavan-web/karavan-app/src/main/webui/src/api/KaravanApi.tsx +++ b/karavan-web/karavan-app/src/main/webui/src/api/KaravanApi.tsx @@ -640,38 +640,4 @@ export class KaravanApi { const uri = `/api/file/openapi/${generateRest}/${generateRoutes}/${integrationName}`; return instance.post(encodeURI(uri), file); } - -static async fetchData(type: 'container' | 'build' | 'none', podName: string, controller: AbortController) { -const fetchData = async () => { -const headers: any = { Accept: "text/event-stream" }; -if (KaravanApi.authType === 'oidc') { -headers.Authorization = "Bearer " + SsoApi.keycloak?.token -} -await fetchEventSource("/api/logwatch/" + type + "/" + podName, { -method: "GET", -headers: headers, -signal: controller.signal, -async onopen(response) { -if (response.ok && response.headers.get('content-type') === EventStreamContentType) { -return; // everything's good -} else if (response.status >= 400 && response.status < 500 && response.status !== 429) { -// client-side errors are usually non-retriable: -console.log("Server side error ", response); -} else { -console.log("Error ", response); -} -}, -onmessage(event) { -ProjectEventBus.sendLog('add', event.data); -}, -onclose() { -console.log("Connection closed by the server"); -}, -onerror(err) { -console.log("There was an error from server", err); -}, -}); -}; -return fetchData(); -} } diff --git a/karavan-web/karavan-app/src/main/webui/src/api/LogWatchApi.tsx b/karavan-web/karavan-app/src/main/webui/src/api/LogWatchApi.tsx new file mode 100644 index ..49f4b134 --- /dev/null +++ b/karavan-web/karavan-app/src/main/webui/src/api/LogWatchApi.tsx @@ -0,0 +1,58 @@ +/* + * 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. + */ + +import {SsoApi} from "./SsoApi"; +import {EventStreamContentType, fetchEventSource} from "@microsoft/fetch-event-source"; +import {ProjectEventBus} from "./ProjectEventBus"; +import {KaravanApi} from "./KaravanApi"; + +export class LogWatchApi { + +static async fetchData(type: 'container' | 'build' | 'none', podName: string, controller: AbortController) { +const fetchData = async () => { +const headers: any = { Accept: "text/event-stream" }; +if (KaravanApi.authType === 'oidc') { +headers.Authorization = "Bearer " + SsoApi.keycloak?.token +} +await fetchEventSource("/api/logwatch/" + type + "/" + podName, { +method: "GET", +headers: headers, +signal: controller.signal, +async onopen(response) { +if (response.ok && response.headers.get('content-type') === EventStreamContentType) { +return; // everything's good +} else if (response.status >= 400 && response.status < 500 && response.status !== 429) { +
(camel-karavan) branch main updated (3da76e97 -> 024e8723)
This is an automated email from the ASF dual-hosted git repository. marat pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git from 3da76e97 Updates for #1115 new c047c843 Split client api new 2bc9eb59 Updates for #1115 new 024e8723 Fix #564 The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/camel/karavan/api/ImagesResource.java | 9 +-- .../camel/karavan/api/NotificationResource.java| 71 ++ .../camel/karavan/api/ProjectGitResource.java | 13 +++- .../camel/karavan/cache/KaravanCacheService.java | 40 +++--- .../camel/karavan/cache/model/CamelStatus.java | 7 +- .../karavan/cache/model/CamelStatusValue.java | 8 +- .../camel/karavan/cache/model/ContainerPort.java | 8 +- .../camel/karavan/cache/model/ContainerStatus.java | 7 +- .../karavan/cache/model/DeploymentStatus.java | 9 ++- .../camel/karavan/cache/model/GroupedKey.java | 8 +- .../apache/camel/karavan/cache/model/Project.java | 7 +- .../camel/karavan/cache/model/ProjectFile.java | 8 +- .../camel/karavan/cache/model/ServiceStatus.java | 8 +- .../camel/karavan/docker/DockerEventListener.java | 4 - .../camel/karavan/service/KaravanService.java | 3 - .../camel/karavan/service/NotificationService.java | 50 + .../camel/karavan/service/ProjectService.java | 32 ++-- .../org/apache/camel/karavan/shared/Constants.java | 7 ++ .../exception/ExceptionToResponseMapper.java | 66 - .../src/main/webui/src/api/KaravanApi.tsx | 53 + .../src/main/webui/src/api/LogWatchApi.tsx | 58 +++ .../src/main/webui/src/api/NotificationApi.tsx | 86 ++ .../src/main/webui/src/api/NotificationService.ts | 57 ++ .../src/main/webui/src/api/ProjectEventBus.ts | 34 + .../src/main/webui/src/api/ProjectService.ts | 9 +-- .../karavan-app/src/main/webui/src/main/Main.tsx | 22 -- .../main/webui/src/project/files/FilesToolbar.tsx | 16 +++- .../main/webui/src/project/log/ProjectLogPanel.tsx | 5 +- 28 files changed, 510 insertions(+), 195 deletions(-) create mode 100644 karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java create mode 100644 karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/service/NotificationService.java delete mode 100644 karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/shared/exception/ExceptionToResponseMapper.java create mode 100644 karavan-web/karavan-app/src/main/webui/src/api/LogWatchApi.tsx create mode 100644 karavan-web/karavan-app/src/main/webui/src/api/NotificationApi.tsx create mode 100644 karavan-web/karavan-app/src/main/webui/src/api/NotificationService.ts
(camel-karavan) 02/03: Updates for #1115
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git commit 2bc9eb59906a8e0d20d7cfb8f1b734ffd2fc654f Author: Marat Gubaidullin AuthorDate: Fri Feb 9 18:38:34 2024 -0500 Updates for #1115 --- .../camel/karavan/api/NotificationResource.java| 63 ++ .../camel/karavan/cache/KaravanCacheService.java | 40 +- .../camel/karavan/cache/model/CamelStatus.java | 7 ++- .../karavan/cache/model/CamelStatusValue.java | 8 ++- .../camel/karavan/cache/model/ContainerPort.java | 8 ++- .../camel/karavan/cache/model/ContainerStatus.java | 7 ++- .../karavan/cache/model/DeploymentStatus.java | 9 +++- .../camel/karavan/cache/model/GroupedKey.java | 8 ++- .../apache/camel/karavan/cache/model/Project.java | 7 ++- .../camel/karavan/cache/model/ProjectFile.java | 8 ++- .../camel/karavan/cache/model/ServiceStatus.java | 8 ++- .../camel/karavan/docker/DockerEventListener.java | 4 -- 12 files changed, 152 insertions(+), 25 deletions(-) diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java new file mode 100644 index ..4ad4de25 --- /dev/null +++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java @@ -0,0 +1,63 @@ +/* + * 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.karavan.api; + +import io.quarkus.runtime.StartupEvent; +import io.smallrye.mutiny.Multi; +import io.vertx.core.json.JsonObject; +import io.vertx.mutiny.core.Vertx; +import io.vertx.mutiny.core.eventbus.EventBus; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import org.jboss.logging.Logger; +import org.jboss.resteasy.reactive.RestStreamElementType; + +import java.util.Date; + +@Path("/api/notification") +public class NotificationResource { + +private static final Logger LOGGER = Logger.getLogger(NotificationResource.class.getName()); + +void onStart(@Observes StartupEvent ev) throws Exception { +System.out.println("STARTING!"); +vertx.setPeriodic(1000, +aLong -> { +vertx.eventBus().publish("test0", new JsonObject().put("user", "test0").put("date", new Date().toString())); +vertx.eventBus().publish("test1", new JsonObject().put("user", "test1").put("date", new Date().toString())); +}); +} + +@Inject +Vertx vertx; +@Inject +EventBus bus; + + +@GET +@Path("{name}") +@Produces(MediaType.SERVER_SENT_EVENTS) +@RestStreamElementType(MediaType.TEXT_PLAIN) +public Multi greetingStream(@PathParam("name") String name) { +return bus.consumer(name).bodyStream().toMulti(); +} +} \ No newline at end of file diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java index a8aa1086..438c7913 100644 --- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java +++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/cache/KaravanCacheService.java @@ -16,6 +16,7 @@ */ package org.apache.camel.karavan.cache; +import com.hazelcast.config.ClasspathXmlConfig; import com.hazelcast.config.ClasspathYamlConfig; import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; @@ -27,13 +28,12 @@ import io.quarkus.runtime.ShutdownEvent; import io.quarkus.runtime.StartupEvent; import jakarta.enterprise.event.Observes; import jakarta.enterprise.inject.Default; +import jakarta.enterprise.inject.Produces; import jakarta.inject.Singleton; import org.apache.camel.karavan.cache.model.*; import org.jboss.logging.Logger; -import java.io.BufferedReader; -import
(camel-karavan) 03/03: Fix #564
This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git commit 024e8723a8b241e9cb1eb09ff17a581913a05b01 Author: Marat Gubaidullin AuthorDate: Sat Feb 10 18:13:42 2024 -0500 Fix #564 --- .../apache/camel/karavan/api/ImagesResource.java | 9 +-- .../camel/karavan/api/NotificationResource.java| 50 -- .../camel/karavan/api/ProjectGitResource.java | 13 +++- .../camel/karavan/service/KaravanService.java | 3 - .../camel/karavan/service/NotificationService.java | 50 ++ .../camel/karavan/service/ProjectService.java | 32 +++-- .../org/apache/camel/karavan/shared/Constants.java | 7 ++ .../exception/ExceptionToResponseMapper.java | 66 --- .../src/main/webui/src/api/KaravanApi.tsx | 19 +- .../src/main/webui/src/api/NotificationApi.tsx | 77 +++--- .../src/main/webui/src/api/NotificationService.ts | 57 .../src/main/webui/src/api/ProjectEventBus.ts | 34 +- .../src/main/webui/src/api/ProjectService.ts | 9 ++- .../karavan-app/src/main/webui/src/main/Main.tsx | 22 +-- .../main/webui/src/project/files/FilesToolbar.tsx | 16 - .../main/webui/src/project/log/ProjectLogPanel.tsx | 2 - 16 files changed, 286 insertions(+), 180 deletions(-) diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/ImagesResource.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/ImagesResource.java index 6bbe60f5..0170918b 100644 --- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/ImagesResource.java +++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/ImagesResource.java @@ -65,11 +65,8 @@ public class ImagesResource { @Path("/{projectId}") public Response build(JsonObject data, @PathParam("projectId") String projectId) throws Exception { try { -String imageName = data.getString("imageName"); -boolean commit = data.getBoolean("commit"); -String message = data.getString("message"); -projectService.setProjectImage(projectId, imageName, commit, message); -return Response.ok().entity(imageName).build(); +projectService.setProjectImage(projectId, data); +return Response.ok().entity(data.getString("imageName")).build(); } catch (Exception e) { return Response.serverError().entity(e.getMessage()).build(); } @@ -78,7 +75,7 @@ public class ImagesResource { @DELETE @Produces(MediaType.APPLICATION_JSON) @Path("/{imageName}") -public Response deleteImage(@HeaderParam("username") String username, @PathParam("imageName") String imageName) { +public Response deleteImage(@PathParam("imageName") String imageName) { imageName= new String(Base64.decode(imageName)); if (ConfigService.inKubernetes()) { return Response.ok().build(); diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java index 4ad4de25..d7f2deb7 100644 --- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java +++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/api/NotificationResource.java @@ -16,48 +16,56 @@ */ package org.apache.camel.karavan.api; -import io.quarkus.runtime.StartupEvent; import io.smallrye.mutiny.Multi; import io.vertx.core.json.JsonObject; -import io.vertx.mutiny.core.Vertx; import io.vertx.mutiny.core.eventbus.EventBus; -import jakarta.enterprise.event.Observes; import jakarta.inject.Inject; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; -import org.jboss.logging.Logger; +import jakarta.ws.rs.sse.OutboundSseEvent; +import jakarta.ws.rs.sse.Sse; import org.jboss.resteasy.reactive.RestStreamElementType; -import java.util.Date; +import static org.apache.camel.karavan.shared.Constants.*; @Path("/api/notification") public class NotificationResource { -private static final Logger LOGGER = Logger.getLogger(NotificationResource.class.getName()); - -void onStart(@Observes StartupEvent ev) throws Exception { -System.out.println("STARTING!"); -vertx.setPeriodic(1000, -aLong -> { -vertx.eventBus().publish("test0", new JsonObject().put("user", "test0").put("date", new Date().toString())); -vertx.eventBus().publish("test1", new JsonObject().put("user", "test1").put("date", new Date().toString())); -}); -} - -@Inject -Vertx vertx; @Inject
Re: [I] Concurrent commits require locking [camel-karavan]
mgubaidullin closed issue #564: Concurrent commits require locking URL: https://github.com/apache/camel-karavan/issues/564 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Concurrent commits require locking [camel-karavan]
mgubaidullin commented on issue #564: URL: https://github.com/apache/camel-karavan/issues/564#issuecomment-1937347212 Implemented as ordered event ``` @ConsumeEvent(value = PUSH_PROJECT, blocking = true, ordered = true) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch regen_bot updated (47439e606bf -> 144d836ee8e)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 47439e606bf (chores) camel-kafka: fixed an out-of-order section add 144d836ee8e Route scoped variables (#13086) No new revisions were added by this update. Summary of changes: .../main/java/org/apache/camel/VariableAware.java | 4 + .../org/apache/camel/spi/VariableRepository.java | 12 --- .../camel/spi/VariableRepositoryFactory.java | 5 ++ .../engine/DefaultVariableRepositoryFactory.java | 32 .../camel/impl/console/VariablesDevConsole.java| 2 +- .../language/simple/SimpleExpressionBuilder.java | 3 +- .../org/apache/camel/builder/ExpressionClause.java | 10 +++ ...VariableTest.java => SetRouteVariableTest.java} | 30 +-- ...Test.java => SetRouteVariableTransferTest.java} | 29 +++ .../camel/main/MainSupportModelConfigurer.java | 8 +- .../management/ManagedNonManagedServiceTest.java | 2 +- ...edProducerRouteAddRemoveRegisterAlwaysTest.java | 2 +- .../management/ManagedRouteAddRemoveTest.java | 2 +- .../org/apache/camel/support/ExchangeHelper.java | 39 ++--- ...epository.java => RouteVariableRepository.java} | 95 ++ .../camel/support/builder/ExpressionBuilder.java | 40 ++--- docs/user-manual/modules/ROOT/pages/variables.adoc | 56 +++-- .../jbang/core/commands/process/ListVariable.java | 27 +++--- 18 files changed, 270 insertions(+), 128 deletions(-) copy core/camel-core/src/test/java/org/apache/camel/processor/{SetGlobalVariableTest.java => SetRouteVariableTest.java} (62%) copy core/camel-core/src/test/java/org/apache/camel/processor/{SetVariableTest.java => SetRouteVariableTransferTest.java} (69%) copy core/camel-support/src/main/java/org/apache/camel/support/{AbstractVariableRepository.java => RouteVariableRepository.java} (54%)
(camel) branch main updated: Route scoped variables (#13086)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 144d836ee8e Route scoped variables (#13086) 144d836ee8e is described below commit 144d836ee8e89ea11ab6801f8ac8b2ec4ae6018a Author: Claus Ibsen AuthorDate: Sat Feb 10 19:34:39 2024 +0100 Route scoped variables (#13086) CAMEL-20406: Route scoped variables --- .../main/java/org/apache/camel/VariableAware.java | 4 + .../org/apache/camel/spi/VariableRepository.java | 12 -- .../camel/spi/VariableRepositoryFactory.java | 5 + .../engine/DefaultVariableRepositoryFactory.java | 32 .../camel/impl/console/VariablesDevConsole.java| 2 +- .../language/simple/SimpleExpressionBuilder.java | 3 +- .../org/apache/camel/builder/ExpressionClause.java | 10 ++ .../camel/processor/SetRouteVariableTest.java | 86 + .../processor/SetRouteVariableTransferTest.java| 62 +++ .../camel/main/MainSupportModelConfigurer.java | 8 +- .../management/ManagedNonManagedServiceTest.java | 2 +- ...edProducerRouteAddRemoveRegisterAlwaysTest.java | 2 +- .../management/ManagedRouteAddRemoveTest.java | 2 +- .../org/apache/camel/support/ExchangeHelper.java | 39 ++-- .../camel/support/RouteVariableRepository.java | 200 + .../camel/support/builder/ExpressionBuilder.java | 40 + docs/user-manual/modules/ROOT/pages/variables.adoc | 56 +- .../jbang/core/commands/process/ListVariable.java | 27 +-- 18 files changed, 508 insertions(+), 84 deletions(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/VariableAware.java b/core/camel-api/src/main/java/org/apache/camel/VariableAware.java index ab82303117c..4fd26d8ea2e 100644 --- a/core/camel-api/src/main/java/org/apache/camel/VariableAware.java +++ b/core/camel-api/src/main/java/org/apache/camel/VariableAware.java @@ -24,6 +24,10 @@ public interface VariableAware { /** * Returns a variable by name. * + * If the variable is of type {@link org.apache.camel.StreamCache} then the repository should ensure to reset the + * stream cache before returning the value, to ensure the content can be read by the Camel end user and would be + * re-readable next time. + * * @param name the name of the variable * @return the value of the given variable or null if there is no variable for the given name */ diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java index fba280fcda1..c186e66e1e6 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java @@ -29,18 +29,6 @@ public interface VariableRepository extends StaticService, VariableAware { */ String getId(); -/** - * Returns a variable by name. - * - * If the variable is of type {@link org.apache.camel.StreamCache} then the repository should ensure to reset the - * stream cache before returning the value, to ensure the content can be read by the Camel end user and would be - * re-readable next time. - * - * @param name the name of the variable - * @return the value of the given variable or null if there is no variable for the given name - */ -Object getVariable(String name); - /** * Removes the given variable * diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java index 00344d23f3c..3029963952e 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java @@ -26,6 +26,11 @@ public interface VariableRepositoryFactory { */ String GLOBAL_VARIABLE_REPOSITORY_ID = "global-variable-repository"; +/** + * Registry bean id for route {@link VariableRepository}. + */ +String ROUTE_VARIABLE_REPOSITORY_ID = "route-variable-repository"; + /** * Gets the {@link VariableRepository} for the given id * diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java index 2e982f43f51..c0b373a67aa 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java @@ -16,7 +16,10 @@ */ package org.apache.camel.impl.engine; +import
Re: [PR] Route scoped variables [camel]
davsclaus merged PR #13086: URL: https://github.com/apache/camel/pull/13086 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch var-route deleted (was bdcb92632ca)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git was bdcb92632ca CAMEL-20406: Route scoped variables The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [PR] Route scoped variables [camel]
github-actions[bot] commented on PR #13086: URL: https://github.com/apache/camel/pull/13086#issuecomment-1937076825 :star2: Thank you for your contribution to the Apache Camel project! :star2: :robot: CI automation will test this PR automatically. :camel: Apache Camel Committers, please review the following items: * First-time contributors **require MANUAL approval** for the GitHub Actions to run * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot. * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR. * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. * :warning: Be careful when sharing logs. Review their contents before sharing them publicly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Route scoped variables [camel]
davsclaus opened a new pull request, #13086: URL: https://github.com/apache/camel/pull/13086 # Description # Target - [ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch) # Tracking - [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [ ] I checked that each commit in the pull request has a meaningful subject line and body. - [ ] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) 05/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit 0cb31eba150f03cd5f34ab98c513fc09361264ac Author: Claus Ibsen AuthorDate: Sat Feb 10 13:51:05 2024 +0100 CAMEL-20406: Route scoped variables --- .../camel/impl/console/VariablesDevConsole.java| 2 +- .../language/simple/SimpleExpressionBuilder.java | 3 ++- .../camel/main/MainSupportModelConfigurer.java | 8 +-- .../jbang/core/commands/process/ListVariable.java | 27 +++--- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/core/camel-console/src/main/java/org/apache/camel/impl/console/VariablesDevConsole.java b/core/camel-console/src/main/java/org/apache/camel/impl/console/VariablesDevConsole.java index 4f1e95415ac..3769cd57a8e 100644 --- a/core/camel-console/src/main/java/org/apache/camel/impl/console/VariablesDevConsole.java +++ b/core/camel-console/src/main/java/org/apache/camel/impl/console/VariablesDevConsole.java @@ -39,8 +39,8 @@ public class VariablesDevConsole extends AbstractDevConsole { Set repos = getCamelContext().getRegistry().findByType(BrowsableVariableRepository.class); for (BrowsableVariableRepository repo : repos) { -sb.append(String.format("Repository: %s (size: %d)", repo.getId(), repo.size())); sb.append("\n"); +sb.append(String.format("Repository: %s (size: %d)", repo.getId(), repo.size())); for (Map.Entry entry : repo.getVariables().entrySet()) { String k = entry.getKey(); Object v = entry.getValue(); diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java index 47fa8d95fb7..eb1e8c0ddb0 100644 --- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java +++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java @@ -39,6 +39,7 @@ import org.apache.camel.spi.UuidGenerator; import org.apache.camel.support.CamelContextHelper; import org.apache.camel.support.ClassicUuidGenerator; import org.apache.camel.support.DefaultUuidGenerator; +import org.apache.camel.support.ExchangeHelper; import org.apache.camel.support.ExpressionAdapter; import org.apache.camel.support.LanguageHelper; import org.apache.camel.support.MessageHelper; @@ -86,7 +87,7 @@ public final class SimpleExpressionBuilder { ognl, "variableOgnl(" + ognl + ")", (exchange, exp) -> { String text = exp.evaluate(exchange, String.class); -return exchange.getVariable(text); +return ExchangeHelper.getVariable(exchange, text); }); } diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java index d6e5a91a5ad..361cacb66cb 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupportModelConfigurer.java @@ -96,8 +96,12 @@ public final class MainSupportModelConfigurer { for (String key : variableProperties.stringPropertyNames()) { String value = variableProperties.getProperty(key); -String id = StringHelper.before(key, ":", "global"); -key = StringHelper.after(key, ":", key); +String id = "global"; +if (key.startsWith("route.")) { +id = "route"; +key = key.substring(6); +key = StringHelper.replaceFirst(key, ".", ":"); +} VariableRepository repo = camelContext.getCamelContextExtension().getContextPlugin(VariableRepositoryFactory.class) .getVariableRepository(id); // it may be a resource to load from disk then diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListVariable.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListVariable.java index b19927f1bfa..177dff83302 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListVariable.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListVariable.java @@ -81,18 +81,19 @@ public class ListVariable extends ProcessWatchCommand { } row.pid = Long.toString(ph.pid()); -// platform-http is special -JsonObject jo = (JsonObject)
(camel) 02/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit 53aaedd19cffaf06f078c36a5f276c7d94299a04 Author: Claus Ibsen AuthorDate: Sat Feb 10 12:40:39 2024 +0100 CAMEL-20406: Route scoped variables --- .../camel/spi/VariableRepositoryFactory.java | 5 + .../engine/DefaultVariableRepositoryFactory.java | 32 .../org/apache/camel/builder/ExpressionClause.java | 10 ++ .../camel/processor/SetRouteVariableTest.java | 86 + .../processor/SetRouteVariableTransferTest.java| 62 +++ .../management/ManagedNonManagedServiceTest.java | 2 +- ...edProducerRouteAddRemoveRegisterAlwaysTest.java | 2 +- .../management/ManagedRouteAddRemoveTest.java | 2 +- .../org/apache/camel/support/ExchangeHelper.java | 39 ++-- .../camel/support/RouteVariableRepository.java | 199 + .../camel/support/builder/ExpressionBuilder.java | 40 + 11 files changed, 431 insertions(+), 48 deletions(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java index 00344d23f3c..3029963952e 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepositoryFactory.java @@ -26,6 +26,11 @@ public interface VariableRepositoryFactory { */ String GLOBAL_VARIABLE_REPOSITORY_ID = "global-variable-repository"; +/** + * Registry bean id for route {@link VariableRepository}. + */ +String ROUTE_VARIABLE_REPOSITORY_ID = "route-variable-repository"; + /** * Gets the {@link VariableRepository} for the given id * diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java index 2e982f43f51..7dac7545f5c 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java @@ -17,6 +17,7 @@ package org.apache.camel.impl.engine; import org.apache.camel.CamelContext; +import org.apache.camel.Route; import org.apache.camel.RuntimeCamelException; import org.apache.camel.StaticService; import org.apache.camel.spi.FactoryFinder; @@ -24,10 +25,14 @@ import org.apache.camel.spi.VariableRepository; import org.apache.camel.spi.VariableRepositoryFactory; import org.apache.camel.support.CamelContextHelper; import org.apache.camel.support.GlobalVariableRepository; +import org.apache.camel.support.LifecycleStrategySupport; +import org.apache.camel.support.RouteVariableRepository; import org.apache.camel.support.service.ServiceSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Collection; + /** * Default {@link VariableRepositoryFactory}. */ @@ -39,6 +44,7 @@ public class DefaultVariableRepositoryFactory extends ServiceSupport implements private final CamelContext camelContext; private VariableRepository global; +private VariableRepository route; private FactoryFinder factoryFinder; public DefaultVariableRepositoryFactory(CamelContext camelContext) { @@ -55,6 +61,9 @@ public class DefaultVariableRepositoryFactory extends ServiceSupport implements if (global != null && "global".equals(id)) { return global; } +if (route != null && "route".equals(id)) { +return route; +} VariableRepository repo = CamelContextHelper.lookup(camelContext, id, VariableRepository.class); if (repo == null) { @@ -98,10 +107,33 @@ public class DefaultVariableRepositoryFactory extends ServiceSupport implements global = new GlobalVariableRepository(); camelContext.getRegistry().bind(GLOBAL_VARIABLE_REPOSITORY_ID, global); } +// let's see if there is a custom route repo +repo = getVariableRepository("route"); +if (repo != null) { +if (!(repo instanceof RouteVariableRepository)) { +LOG.info("Using VariableRepository: {} as route repository", repo.getId()); +} +route = repo; +} else { +route = new RouteVariableRepository(); +camelContext.getRegistry().bind(ROUTE_VARIABLE_REPOSITORY_ID, route); +} if (!camelContext.hasService(global)) { camelContext.addService(global); } +if (!camelContext.hasService(route)) { +camelContext.addService(route); +camelContext.addLifecycleStrategy(new LifecycleStrategySupport() { +
(camel) 03/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit 85f825e70ae27b04e03381d5b6f8255779ce1f00 Author: Claus Ibsen AuthorDate: Sat Feb 10 12:42:57 2024 +0100 CAMEL-20406: Route scoped variables --- .../src/main/java/org/apache/camel/support/RouteVariableRepository.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/camel-support/src/main/java/org/apache/camel/support/RouteVariableRepository.java b/core/camel-support/src/main/java/org/apache/camel/support/RouteVariableRepository.java index 11b126acf44..13f8b135e7c 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/RouteVariableRepository.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/RouteVariableRepository.java @@ -157,6 +157,7 @@ public final class RouteVariableRepository extends ServiceSupport implements Bro if (variables != null) { if ("*".equals(key)) { variables.clear(); +routes.remove(id); return null; } else { return variables.remove(key);
(camel) 04/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit 22f87e0530e0a8c262bacee0ffc303744fb5cdaa Author: Claus Ibsen AuthorDate: Sat Feb 10 12:56:46 2024 +0100 CAMEL-20406: Route scoped variables --- .../engine/DefaultVariableRepositoryFactory.java | 4 +- docs/user-manual/modules/ROOT/pages/variables.adoc | 45 +- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java index 7dac7545f5c..c0b373a67aa 100644 --- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java +++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultVariableRepositoryFactory.java @@ -16,6 +16,8 @@ */ package org.apache.camel.impl.engine; +import java.util.Collection; + import org.apache.camel.CamelContext; import org.apache.camel.Route; import org.apache.camel.RuntimeCamelException; @@ -31,8 +33,6 @@ import org.apache.camel.support.service.ServiceSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Collection; - /** * Default {@link VariableRepositoryFactory}. */ diff --git a/docs/user-manual/modules/ROOT/pages/variables.adoc b/docs/user-manual/modules/ROOT/pages/variables.adoc index 0e84edd115e..1a6b96b5394 100644 --- a/docs/user-manual/modules/ROOT/pages/variables.adoc +++ b/docs/user-manual/modules/ROOT/pages/variables.adoc @@ -15,9 +15,11 @@ and some EIPs and components. With the newly introduced _variables_ then these a The variables are stored in one or more `org.apache.camel.spi.VariableRepository`. By default, there are the following repositories - `ExchangeVariableRepository` - A private repository per `Exchange` that holds variables that are private for the lifecycle of each `Exchange`. -- `GlobalVariableRepository` - Uses `global` as id. A shared global repository for the entire `CamelContext`. +- `RouteVariableRepository` - Uses `route` as id. A single repository, that holds variables per `Route`. +- `GlobalVariableRepository` - Uses `global` as id. A single global repository for the entire `CamelContext`. The `ExchangeVariableRepository` is special as its private per exchange and is the default repository when used during routing. +The `RouteVariableRepository` is a single repository that holds variables that are route scoped. TIP: There is also `org.apache.camel.spi.BrowsableVariableRepository` which is an extension to `VariableRepository` that has APIs to browse the currently variables. This is used by Camel with Camel JBang, and JMX to be able to see the current variables @@ -28,7 +30,7 @@ from management tooling, CLI and the developer console. You can implement custom `org.apache.camel.spi.VariableRepository` and plugin to be used out of the box with Apache Camel. For example, you can build a custom repository that stores the variables in a database, so they are persisted. -Each repository must have its own unique id. However, it's also possible to replace the default `global` repository with another. +Each repository must have its own unique id. However, it's also possible to replace the default `global`, or `route` repositories with another. IMPORTANT: The id `exchange` and `header` is reserved by Camel internally and should not be used as id for custom repositories. @@ -74,6 +76,23 @@ Object val = context.getVariable("myGlobalKey"); String str = context.getVariable("myGlobalKey", String.class); +You can also assign a variable to a specific route with `route:` as follows: + +[source,java] + +exchange.setVariable("route:myRouteId:myRouteKey", someObjectHere); + + +And you can get route variables as well: + +[source,java] + +Object val = context.getVariable("route:myRouteId:myRouteKey"); + +// you can get the value as a specific type +String str = context.getVariable("route:myRouteId:myRouteKey", String.class); + + == Setting and getting variables from DSL It is also possible to use variables in Camel xref:routes.adoc[routes] using the @@ -139,6 +158,28 @@ YAML:: +When `route` variables in Camel routes, then the `routeId` is implied as the current route, if not explicit declared. +For example the following example the first route will set a variable in the 2nd route. And then 2nd route can then get +the route variable without having to specify the route id: + +[tabs] + +Java:: ++ +[source,java] + +from("direct:start").routeId("first") +// sets variable in another route +.setVariable("route:second:foo").constant("Hello World") +.to("mock:end"); + +from("direct:second").routeId("second") +// use variable from this route +
(camel) branch var-route created (now bdcb92632ca)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git at bdcb92632ca CAMEL-20406: Route scoped variables This branch includes the following new commits: new c8f17a02cb1 CAMEL-20406: Route scoped variables new 53aaedd19cf CAMEL-20406: Route scoped variables new 85f825e70ae CAMEL-20406: Route scoped variables new 22f87e0530e CAMEL-20406: Route scoped variables new 0cb31eba150 CAMEL-20406: Route scoped variables new bdcb92632ca CAMEL-20406: Route scoped variables The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(camel) 01/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit c8f17a02cb13543512c28e26185d70f165e48199 Author: Claus Ibsen AuthorDate: Sat Feb 10 11:23:30 2024 +0100 CAMEL-20406: Route scoped variables --- .../src/main/java/org/apache/camel/VariableAware.java| 4 .../main/java/org/apache/camel/spi/VariableRepository.java | 12 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/VariableAware.java b/core/camel-api/src/main/java/org/apache/camel/VariableAware.java index ab82303117c..4fd26d8ea2e 100644 --- a/core/camel-api/src/main/java/org/apache/camel/VariableAware.java +++ b/core/camel-api/src/main/java/org/apache/camel/VariableAware.java @@ -24,6 +24,10 @@ public interface VariableAware { /** * Returns a variable by name. * + * If the variable is of type {@link org.apache.camel.StreamCache} then the repository should ensure to reset the + * stream cache before returning the value, to ensure the content can be read by the Camel end user and would be + * re-readable next time. + * * @param name the name of the variable * @return the value of the given variable or null if there is no variable for the given name */ diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java index fba280fcda1..c186e66e1e6 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/VariableRepository.java @@ -29,18 +29,6 @@ public interface VariableRepository extends StaticService, VariableAware { */ String getId(); -/** - * Returns a variable by name. - * - * If the variable is of type {@link org.apache.camel.StreamCache} then the repository should ensure to reset the - * stream cache before returning the value, to ensure the content can be read by the Camel end user and would be - * re-readable next time. - * - * @param name the name of the variable - * @return the value of the given variable or null if there is no variable for the given name - */ -Object getVariable(String name); - /** * Removes the given variable *
(camel) 06/06: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch var-route in repository https://gitbox.apache.org/repos/asf/camel.git commit bdcb92632ca9bbdcfeb4cae69a8963ad1677d440 Author: Claus Ibsen AuthorDate: Sat Feb 10 13:54:15 2024 +0100 CAMEL-20406: Route scoped variables --- docs/user-manual/modules/ROOT/pages/variables.adoc | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/variables.adoc b/docs/user-manual/modules/ROOT/pages/variables.adoc index 1a6b96b5394..9c3dc1a9a38 100644 --- a/docs/user-manual/modules/ROOT/pages/variables.adoc +++ b/docs/user-manual/modules/ROOT/pages/variables.adoc @@ -182,7 +182,7 @@ from("direct:second").routeId("second") == Configuring initial variables on startup -When Camel is starting then it's possible to configure initial variables. +When Camel is starting then it's possible to configure initial variables for `global` and `route` repositories only. This can be done in `application.properties` as shown below: @@ -192,17 +192,18 @@ camel.variable.greeting = Random number camel.variable.random = 999 -The variables are default set on the `global` repository, but you can specify a custom repository by -prefixing with `id:` in the key, such as below: +The variables are default set on the `global` repository, but you can set route scoped variables, +using `route.` as prefix. As we cannot use colon (`:`) in property keys, then dot is used to separate +the route id from the variable name, eg `myRoute.gold`. [source,properties] -camel.variable.acme:gold = true +camel.variable.route.myRoute.gold = true camel.variable.greeting = Random number camel.variable.random = 999 -Here the gold variable is set on the `acme` repository, and the other variables are set on the `global` repository. +Here the gold variable is set on the `route` repository, and the other variables are set on the `global` repository. The value of a variable can also be loaded from file system, such as a JSon file. To do this you should prefix the value with `resource:file:` or `resource:classpath:` to load from file system or classpath,
(camel-kamelets-examples) branch main updated: CAMEL-20406: Route scoped variables
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git The following commit(s) were added to refs/heads/main by this push: new ee86aee CAMEL-20406: Route scoped variables ee86aee is described below commit ee86aee27c45989a0e574457331d4e363e69d437 Author: Claus Ibsen AuthorDate: Sat Feb 10 13:51:13 2024 +0100 CAMEL-20406: Route scoped variables --- jbang/variables/application.properties | 2 +- jbang/variables/myapp.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jbang/variables/application.properties b/jbang/variables/application.properties index ac301bd..1a59ed7 100644 --- a/jbang/variables/application.properties +++ b/jbang/variables/application.properties @@ -1,3 +1,3 @@ # variables can be pre-configured on startup camel.variable.greeting = Random number -camel.variable.random = 999 +camel.variable.route.second.random.number = 999 diff --git a/jbang/variables/myapp.java b/jbang/variables/myapp.java index 1f10ce3..f4374c5 100644 --- a/jbang/variables/myapp.java +++ b/jbang/variables/myapp.java @@ -8,10 +8,10 @@ public class myapp extends RouteBuilder { public void configure() throws Exception { from("timer:java") .setVariable("global:app", simple("${camelId}")) -.setVariable("global:random", simple("${random(1,10)}")); +.setVariable("route:second:random.number", simple("${random(1,10)}")); -from("timer:random?period={{time:1000}}") -.setBody(simple("${variable.global:greeting}: ${variable.global:random}")) +from("timer:random?period={{time:1000}}").routeId("second") +.setBody(simple("${variable.global:greeting}: ${variable.route:random.number}")) .log("${body}"); }
Error while running github feature from .asf.yaml in camel-website-pub!
An error occurred while running github feature in .asf.yaml!: 422 {"message": "Validation Failed", "errors": [{"message": "Sorry, you need to allow at least one merge strategy. (no_merge_method)", "resource": "Repository", "field": "merge_commit_allowed", "code": "invalid"}], "documentation_url": "https://docs.github.com/rest/repos/repos#update-a-repository"}
(camel-website-pub) branch asf-site updated (6bcda5ddd -> c4d34b688)
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/camel-website-pub.git discard 6bcda5ddd Website updated to 0c75f7a2423bd028aedb38c279dcd91b6c000f33 discard 8b6f2fefa Website updated to 325e929157412b27394080f4d4dba3d821476ddf new 597b45c87 Website updated to 325e929157412b27394080f4d4dba3d821476ddf new c4d34b688 Website updated to 0dcaf9ae2bf9935b45fc6c6089d28328a80d6ce7 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (6bcda5ddd) \ N -- N -- N refs/heads/asf-site (c4d34b688) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .htaccess | 230 +- .well-known/security.txt |2 +- camel-core/contributing/building.html |3 +- camel-core/contributing/index.html | 16 +- camel-core/contributing/testing-camel.html |2 + camel-k/2.2.x/apis/camel-k.html|2 +- camel-k/2.2.x/traits/cron.html |2 +- camel-k/next/apis/camel-k.html |2 +- camel-k/next/traits/mount.html |2 +- ...batch-apicurio-registry-not-secured-source.html |2 +- .../kafka-batch-azure-schema-registry-source.html |2 +- .../next/kafka-batch-not-secured-source.html |2 +- camel-kamelets/next/kafka-batch-scram-source.html |2 +- camel-kamelets/next/kafka-batch-source.html|2 +- camel-kamelets/next/kafka-batch-ssl-source.html|2 +- camel-kamelets/next/throttle-action.html | 10 +- camel-quarkus/2.16.x/index.html|2 +- camel-quarkus/3.2.x/index.html |2 +- .../3.2.x/reference/extensions/salesforce.html |2 +- camel-quarkus/3.7.x/index.html |2 +- .../next/contributor-guide/release-guide.html |2 +- camel-quarkus/next/index.html |2 +- camel-quarkus/next/reference/components.html |2 +- .../next/reference/extensions/jasypt.html |4 +- .../next/reference/extensions/splunk-hec.html |4 +- camel-quarkus/next/reference/index.html|2 +- .../next/user-guide/dependency-management.html |4 +- camel-quarkus/next/user-guide/first-steps.html |2 +- components/next/activemq-component.html|4 +- components/next/amqp-component.html| 10 +- components/next/arangodb-component.html|2 +- components/next/asterisk-component.html|2 +- components/next/atom-component.html|2 +- components/next/avro-component.html| 16 +- components/next/aws-cloudtrail-component.html |4 +- components/next/aws-config-component.html |4 +- components/next/aws-secrets-manager-component.html | 16 +- components/next/aws2-athena-component.html | 10 +- components/next/aws2-cw-component.html |4 +- components/next/aws2-ddb-component.html|4 +- components/next/aws2-ddbstream-component.html |4 +- components/next/aws2-ec2-component.html|8 +- components/next/aws2-ecs-component.html|8 +- components/next/aws2-eks-component.html|8 +- components/next/aws2-eventbridge-component.html| 24 +- components/next/aws2-iam-component.html|8 +- components/next/aws2-kinesis-component.html|4 +- .../next/aws2-kinesis-firehose-component.html |6 +- components/next/aws2-kms-component.html|8 +- components/next/aws2-lambda-component.html |8 +- components/next/aws2-mq-component.html |8 +- components/next/aws2-msk-component.html|8 +- components/next/aws2-redshift-data-component.html |6 +- components/next/aws2-s3-component.html | 42 +- components/next/aws2-ses-component.html|4 +- components/next/aws2-sns-component.html| 10 +- components/next/aws2-sqs-component.html| 14 +-
(camel) branch regen_bot updated (1e397eee00f -> 47439e606bf)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 1e397eee00f (chores) doc: minor contributions clarifications add 47439e606bf (chores) camel-kafka: fixed an out-of-order section No new revisions were added by this update. Summary of changes: components/camel-kafka/src/main/docs/kafka-component.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
(camel) branch main updated: (chores) camel-kafka: fixed an out-of-order section
This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 47439e606bf (chores) camel-kafka: fixed an out-of-order section 47439e606bf is described below commit 47439e606bf3f488b7e9108a4b3c2c4874372f71 Author: Otavio R. Piske AuthorDate: Sat Feb 10 14:29:47 2024 +0100 (chores) camel-kafka: fixed an out-of-order section This was likely causing the website build to fail Signed-off-by: Otavio R. Piske --- components/camel-kafka/src/main/docs/kafka-component.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 434c5a64a3f..42423f9ceb7 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -615,7 +615,6 @@ public void configure() { }); } -include::spring-boot:partial$starter.adoc[] Dealing with long polling timeouts @@ -635,5 +634,7 @@ public void configure() { } +include::spring-boot:partial$starter.adoc[] +
(camel) branch regen_bot updated (b4826aa727c -> 1e397eee00f)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from b4826aa727c CAMEL-20333 Camel Kotlin API (#12786) add 9ec83b2bf6c (chores) camel-zeebe: avoid polluting the build add 1e397eee00f (chores) doc: minor contributions clarifications No new revisions were added by this update. Summary of changes: components/camel-zeebe/pom.xml | 27 - docs/main/modules/contributing/pages/index.adoc | 5 - 2 files changed, 4 insertions(+), 28 deletions(-)
Re: [PR] (chores) camel-kafka: fixed an out-of-order section [camel]
orpiske merged PR #13085: URL: https://github.com/apache/camel/pull/13085 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-kafka: fixed an out-of-order section [camel]
github-actions[bot] commented on PR #13085: URL: https://github.com/apache/camel/pull/13085#issuecomment-1937008139 :star2: Thank you for your contribution to the Apache Camel project! :star2: :robot: CI automation will test this PR automatically. :camel: Apache Camel Committers, please review the following items: * First-time contributors **require MANUAL approval** for the GitHub Actions to run * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot. * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR. * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. * :warning: Be careful when sharing logs. Review their contents before sharing them publicly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] (chores) camel-kafka: fixed an out-of-order section [camel]
orpiske opened a new pull request, #13085: URL: https://github.com/apache/camel/pull/13085 This was likely causing the website build to fail Signed-off-by: Otavio R. Piske -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch main updated: (chores) doc: minor contributions clarifications
This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 1e397eee00f (chores) doc: minor contributions clarifications 1e397eee00f is described below commit 1e397eee00f7c859d2cb0dff268cba8066b372ba Author: Otavio R. Piske AuthorDate: Sat Feb 10 11:27:32 2024 +0100 (chores) doc: minor contributions clarifications - about build changes - about missing assertions Signed-off-by: Otavio R. Piske --- docs/main/modules/contributing/pages/index.adoc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/main/modules/contributing/pages/index.adoc b/docs/main/modules/contributing/pages/index.adoc index 6b5740b434d..fb6deb5c913 100644 --- a/docs/main/modules/contributing/pages/index.adoc +++ b/docs/main/modules/contributing/pages/index.adoc @@ -237,8 +237,11 @@ CAMEL-: Some message goes here === Making a good contribution +* Less is more: +** Avoid creating unnecessary Maven profiles (i.e.; to enable/disable tests) +** Avoid creating custom surefire/failsafe configurations (use defaults as much as possible) * Ensure that the unit tests include proper assertions. -* Avoid simply outputting changes to the standard output/error or just logging. +* Avoid simply outputting changes to the standard output/error or just logging (tests **must** have assertions). * Please also avoid unnecessary changes, like reordering methods and fields, which will make your PR harder to review. * When submitting a performance improvement, providing JMH test data as evidence or adding a JMH-based test on the https://github.com/apache/camel-performance-tests/[camel-performance-tests] repository is strongly recommended. * Be responsive, assume good intent and respect the https://www.apache.org/foundation/policies/conduct.html[Code of Conduct]
Re: [PR] (chores) doc: minor contributions clarifications [camel]
orpiske merged PR #13084: URL: https://github.com/apache/camel/pull/13084 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch main updated: (chores) camel-zeebe: avoid polluting the build
This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new 9ec83b2bf6c (chores) camel-zeebe: avoid polluting the build 9ec83b2bf6c is described below commit 9ec83b2bf6ca03fd9e7cb61ef16f9c074bab0726 Author: Otavio R. Piske AuthorDate: Sat Feb 10 11:14:48 2024 +0100 (chores) camel-zeebe: avoid polluting the build Remove unnecessary profile to avoid polluting/over-complicating the build Signed-off-by: Otavio R. Piske --- components/camel-zeebe/pom.xml | 27 --- 1 file changed, 27 deletions(-) diff --git a/components/camel-zeebe/pom.xml b/components/camel-zeebe/pom.xml index 64dbe4868a3..7a61dbd0382 100644 --- a/components/camel-zeebe/pom.xml +++ b/components/camel-zeebe/pom.xml @@ -103,31 +103,4 @@ test - - - -zeebe-integration - - - -org.apache.maven.plugins -maven-failsafe-plugin - - - -integration-test -verify - - - - - - true - - - - - - -
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
orpiske merged PR #13083: URL: https://github.com/apache/camel/pull/13083 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
davsclaus commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1937000922 ok -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
orpiske commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936988922 But, if you have that external infrastructure, triggering the test is actually pretty simple, though: `mvn -Dzeebe.test.integration.enable=true verify`. That has the added benefit that we don't have to add a profile (and 20+ lines of build code) for every component that needs an external entity to run. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
orpiske commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936988071 Yes. That's how it works for all of our tests that depend on an external infrastructure that we cannot provide. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch regen_bot updated (b3fd13c755e -> b4826aa727c)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from b3fd13c755e CAMEL-20403: Support Knative Broker reference in Pipe YAML (#13078) add b4826aa727c CAMEL-20333 Camel Kotlin API (#12786) No new revisions were added by this update. Summary of changes: bom/camel-bom/pom.xml | 5 + .../org/apache/camel/catalog/others.properties | 1 + .../apache/camel/catalog/others/kotlin-api.json| 15 + dsl/camel-kotlin-api/pom.xml | 224 ++ .../camel/kotlin/components/ActivemqUriDsl.kt | 674 + .../apache/camel/kotlin/components/AmqpUriDsl.kt | 670 + .../camel/kotlin/components/ArangodbUriDsl.kt | 99 +++ .../apache/camel/kotlin/components/As2UriDsl.kt| 222 ++ .../camel/kotlin/components/AsteriskUriDsl.kt | 86 +++ .../kotlin/components/AtmosphereWebsocketUriDsl.kt | 247 ++ .../apache/camel/kotlin/components/AtomUriDsl.kt | 199 + .../apache/camel/kotlin/components/AvroUriDsl.kt | 129 .../camel/kotlin/components/Aws2AthenaUriDsl.kt| 223 ++ .../apache/camel/kotlin/components/Aws2CwUriDsl.kt | 160 .../camel/kotlin/components/Aws2DdbUriDsl.kt | 187 + .../camel/kotlin/components/Aws2DdbstreamUriDsl.kt | 263 +++ .../camel/kotlin/components/Aws2Ec2UriDsl.kt | 151 .../camel/kotlin/components/Aws2EcsUriDsl.kt | 151 .../camel/kotlin/components/Aws2EksUriDsl.kt | 151 .../kotlin/components/Aws2EventbridgeUriDsl.kt | 155 .../camel/kotlin/components/Aws2IamUriDsl.kt | 151 .../kotlin/components/Aws2KinesisFirehoseUriDsl.kt | 151 .../camel/kotlin/components/Aws2KinesisUriDsl.kt | 299 .../camel/kotlin/components/Aws2KmsUriDsl.kt | 151 .../camel/kotlin/components/Aws2LambdaUriDsl.kt| 151 .../apache/camel/kotlin/components/Aws2MqUriDsl.kt | 151 .../camel/kotlin/components/Aws2MskUriDsl.kt | 151 .../kotlin/components/Aws2RedshiftDataUriDsl.kt| 151 .../apache/camel/kotlin/components/Aws2S3UriDsl.kt | 507 + .../camel/kotlin/components/Aws2SesUriDsl.kt | 167 + .../camel/kotlin/components/Aws2SnsUriDsl.kt | 195 + .../camel/kotlin/components/Aws2SqsUriDsl.kt | 447 +++ .../kotlin/components/Aws2StepFunctionsUriDsl.kt | 151 .../camel/kotlin/components/Aws2StsUriDsl.kt | 139 .../kotlin/components/Aws2TimestreamUriDsl.kt | 150 .../camel/kotlin/components/Aws2TranslateUriDsl.kt | 167 + .../camel/kotlin/components/AwsCloudtrailUriDsl.kt | 263 +++ .../camel/kotlin/components/AwsConfigUriDsl.kt | 151 .../kotlin/components/AwsSecretsManagerUriDsl.kt | 159 .../camel/kotlin/components/AzureCosmosdbUriDsl.kt | 222 ++ .../kotlin/components/AzureEventhubsUriDsl.kt | 170 + .../camel/kotlin/components/AzureFilesUriDsl.kt| 645 .../camel/kotlin/components/AzureKeyVaultUriDsl.kt | 78 ++ .../kotlin/components/AzureServicebusUriDsl.kt | 187 + .../kotlin/components/AzureStorageBlobUriDsl.kt| 350 + .../components/AzureStorageDatalakeUriDsl.kt | 358 + .../kotlin/components/AzureStorageQueueUriDsl.kt | 238 ++ .../apache/camel/kotlin/components/BeanUriDsl.kt | 66 ++ .../camel/kotlin/components/BeanValidatorUriDsl.kt | 86 +++ .../apache/camel/kotlin/components/BonitaUriDsl.kt | 74 ++ .../apache/camel/kotlin/components/BoxUriDsl.kt| 138 .../camel/kotlin/components/BraintreeUriDsl.kt | 122 +++ .../apache/camel/kotlin/components/BrowseUriDsl.kt | 70 ++ .../camel/kotlin/components/CaffeineCacheUriDsl.kt | 131 .../kotlin/components/CaffeineLoadcacheUriDsl.kt | 131 .../camel/kotlin/components/ChatscriptUriDsl.kt| 86 +++ .../apache/camel/kotlin/components/ChunkUriDsl.kt | 98 +++ .../apache/camel/kotlin/components/ClassUriDsl.kt | 66 ++ .../apache/camel/kotlin/components/CmSmsUriDsl.kt | 79 ++ .../apache/camel/kotlin/components/CoapUriDsl.kt | 138 .../apache/camel/kotlin/components/CometdUriDsl.kt | 174 + .../apache/camel/kotlin/components/ConsulUriDsl.kt | 171 + .../camel/kotlin/components/ControlbusUriDsl.kt| 90 +++ .../camel/kotlin/components/CouchbaseUriDsl.kt | 334 + .../camel/kotlin/components/CouchdbUriDsl.kt | 137 .../apache/camel/kotlin/components/CqlUriDsl.kt| 249 +++ .../apache/camel/kotlin/components/CronUriDsl.kt | 66 ++ .../apache/camel/kotlin/components/CryptoUriDsl.kt | 142 .../apache/camel/kotlin/components/CxfUriDsl.kt| 254 +++ .../apache/camel/kotlin/components/CxfrsUriDsl.kt | 230 ++ .../camel/kotlin/components/DataformatUriDsl.kt| 61 ++ .../camel/kotlin/components/DatasetTestUriDsl.kt |
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
davsclaus commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936979222 So if you want to not skip the tests, you need to find out to set that magic JVM system property -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-20333 Camel Kotlin API [camel]
davsclaus merged PR #12786: URL: https://github.com/apache/camel/pull/12786 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] (chores) doc: minor contributions clarifications [camel]
orpiske opened a new pull request, #13084: URL: https://github.com/apache/camel/pull/13084 - about build changes - about missing assertions Signed-off-by: Otavio R. Piske -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
orpiske commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936963813 > I think you also need to change the IT classes as they are configured to only run if that value = true It's not necessary. They are already blocked by JUnit's `@EnabledIfSystemProperty`: ``` [INFO] --- failsafe:3.2.5:integration-test (integration-test) @ camel-zeebe --- [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider [INFO] [INFO] --- [INFO] T E S T S [INFO] --- [INFO] Running org.apache.camel.component.zeebe.internal.ZeebeServiceIT [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.003 s -- in org.apache.camel.component.zeebe.internal.ZeebeServiceIT [INFO] Running org.apache.camel.component.zeebe.ThrowErrorIT [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0 s -- in org.apache.camel.component.zeebe.ThrowErrorIT [INFO] Running org.apache.camel.component.zeebe.ResourceDeploymentIT [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.001 s -- in org.apache.camel.component.zeebe.ResourceDeploymentIT [INFO] Running org.apache.camel.component.zeebe.ZeebeConsumerIT [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.001 s -- in org.apache.camel.component.zeebe.ZeebeConsumerIT [INFO] [INFO] Results: [INFO] [WARNING] Tests run: 10, Failures: 0, Errors: 0, Skipped: 10 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
davsclaus commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936963062 I think you also need to change the IT classes as they are configured to only run if that value = true -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] (chores) camel-zeebe: avoid polluting the build [camel]
github-actions[bot] commented on PR #13083: URL: https://github.com/apache/camel/pull/13083#issuecomment-1936962739 :star2: Thank you for your contribution to the Apache Camel project! :star2: :robot: CI automation will test this PR automatically. :camel: Apache Camel Committers, please review the following items: * First-time contributors **require MANUAL approval** for the GitHub Actions to run * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot. * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR. * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. * :warning: Be careful when sharing logs. Review their contents before sharing them publicly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CAMEL-20405] renamed classes from *IntegrationTest.java to *IT.java [camel]
orpiske commented on PR #13082: URL: https://github.com/apache/camel/pull/13082#issuecomment-1936960501 > Otavio do you mean that some of the component have customized configuration for failsafe-plugin in their pom? It seems so as if you do a git grep failsafe-plugin then there are about 10 components. I don't mean those, but just as a matter of explanation, there are some components that have custom configuration to support a few cases: * Enable testing on "alternative" platforms (`ppc64le`, `s390x`, etc). For instance, `camel-consul` and `camel-zookeeper`. * Add backwards/forwards compatibility testing. For instance, `camel-kafka` has extra goals to test the code against Kafka 2.x * Other component-specific testing tweaks/configuration. For instance `camel-infinispan` and `camel-salesforce`. That's why I said mentioned that the configuration for `camel-salesforce` needed to be adjusted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-20333 Camel Kotlin API [camel]
davsclaus commented on PR #12786: URL: https://github.com/apache/camel/pull/12786#issuecomment-1936958239 Also your unit test classes should be renamed from `xxTests` to `xxTest` otherwise they do not run when doing maven test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CAMEL-20405] renamed classes from *IntegrationTest.java to *IT.java [camel]
orpiske commented on PR #13082: URL: https://github.com/apache/camel/pull/13082#issuecomment-1936958035 > > I think you also need to review the failsafe plugin configuration on the component's pom file. > > Otavio do you mean that some of the component have customized configuration for `failsafe-plugin` in their pom? It seems so as if you do a `git grep failsafe-plugin` then there are about 10 components. > > But even so what changes are we looking for to do? Would it be if they do some naming matching where they expected names of xxxIntegrationTest style, and this PR renames the names back into xxxIT style. No, I just mean that (I think) the failsafe plugin configuration for `camel-safesforce` also needs to be updated because [we do seems to adjust it for the `*IntegrationTest.java` pattern](https://github.com/apache/camel/blob/main/components/camel-salesforce/camel-salesforce-component/pom.xml#L449-L487). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-20333 Camel Kotlin API [camel]
davsclaus commented on PR #12786: URL: https://github.com/apache/camel/pull/12786#issuecomment-1936957887 I wonder if you can make the maven plugin to only output "Generating Language DSL for simple" ... when there was some changes. Its very verbose when nothing is changed. We are doing this for the other DSLs -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CAMEL-20333 Camel Kotlin API [camel]
davsclaus commented on PR #12786: URL: https://github.com/apache/camel/pull/12786#issuecomment-1936950847 Thanks, can you update the PR as there was a new option so there is uncommitred code changes and the CI cannot do a full test. + public fun sinkBinding(sinkBinding: String) { +it.property("sinkBinding", sinkBinding) + } + -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(camel) branch regen_bot updated (7832ed04cfc -> b3fd13c755e)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 7832ed04cfc (chores) camel-aws-xray: documentation fixes add b3fd13c755e CAMEL-20403: Support Knative Broker reference in Pipe YAML (#13078) No new revisions were added by this update. Summary of changes: .../camel/dsl/yaml/YamlRoutesBuilderLoader.java| 31 +- .../apache/camel/dsl/yaml/PipeLoaderTest.groovy| 123 - .../camel/dsl/yaml/support/YamlTestSupport.groovy | 14 ++- 3 files changed, 158 insertions(+), 10 deletions(-)
(camel) branch main updated: CAMEL-20403: Support Knative Broker reference in Pipe YAML (#13078)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/main by this push: new b3fd13c755e CAMEL-20403: Support Knative Broker reference in Pipe YAML (#13078) b3fd13c755e is described below commit b3fd13c755efd97cf7a316c28f9774ac785c6274 Author: Christoph Deppisch AuthorDate: Sat Feb 10 10:07:26 2024 +0100 CAMEL-20403: Support Knative Broker reference in Pipe YAML (#13078) - Pipes may reference a Knative broker as a source/sink - Properly configure the Knative component endpoint URI on the resulting route definition - Make sure to always use Locale.ENGLISH when performing schema validation in YAML DSL unit tests (avoids assertion errors due to internationalized error messages when tests are run on a machine with different default Locale set e.g. GERMAN) --- .../camel/dsl/yaml/YamlRoutesBuilderLoader.java| 31 +- .../apache/camel/dsl/yaml/PipeLoaderTest.groovy| 123 - .../camel/dsl/yaml/support/YamlTestSupport.groovy | 14 ++- 3 files changed, 158 insertions(+), 10 deletions(-) diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java index 2a9c7ffd224..9b95c5fb9f7 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java @@ -105,7 +105,9 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport { private static final String BINDING_VERSION = "camel.apache.org/v1alpha1"; private static final String PIPE_VERSION = "camel.apache.org/v1"; private static final String STRIMZI_VERSION = "kafka.strimzi.io/v1"; -private static final String KNATIVE_VERSION = "messaging.knative.dev/v1"; +private static final String KNATIVE_MESSAGING_VERSION = "messaging.knative.dev/v1"; +private static final String KNATIVE_EVENTING_VERSION = "eventing.knative.dev/v1"; +private static final String KNATIVE_EVENT_TYPE = "org.apache.camel.event"; private final Map preparseDone = new ConcurrentHashMap<>(); @@ -875,11 +877,17 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport { boolean strimzi = !kamelet && mn != null && anyTupleMatches(mn.getValue(), "apiVersion", v -> v.startsWith(STRIMZI_VERSION)) && anyTupleMatches(mn.getValue(), "kind", "KafkaTopic"); -boolean knative +boolean knativeBroker += !kamelet && mn != null +&& anyTupleMatches(mn.getValue(), "apiVersion", v -> v.startsWith(KNATIVE_EVENTING_VERSION)) +&& anyTupleMatches(mn.getValue(), "kind", "Broker"); +boolean knativeChannel = !kamelet && !strimzi && mn != null -&& anyTupleMatches(mn.getValue(), "apiVersion", v -> v.startsWith(KNATIVE_VERSION)); +&& anyTupleMatches(mn.getValue(), "apiVersion", v -> v.startsWith(KNATIVE_MESSAGING_VERSION)); String uri; -if (kamelet || strimzi || knative) { +if (knativeBroker) { +uri = KNATIVE_EVENT_TYPE; +} else if (kamelet || strimzi || knativeChannel) { uri = extractTupleValue(mn.getValue(), "name"); } else { uri = extractTupleValue(node.getValue(), "uri"); @@ -888,6 +896,12 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport { // properties MappingNode prop = asMappingNode(nodeAt(node, "/properties")); Map params = asMap(prop); + +if (knativeBroker && params != null && params.containsKey("type")) { +// Use explicit event type from properties - remove setting from params and set as uri +uri = params.remove("type").toString(); +} + if (params != null && !params.isEmpty()) { String query = URISupport.createQueryString(params); uri = uri + "?" + query; @@ -897,7 +911,14 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport { return "kamelet:" + uri; } else if (strimzi) { return "kafka:" + uri; -} else if (knative) { +} else if (knativeBroker) { +if (uri.contains("?")) { +uri += "=Broker=" + extractTupleValue(mn.getValue(), "name"); +} else { +uri += "?kind=Broker=" + extractTupleValue(mn.getValue(), "name"); +} +return "knative:event/" + uri; +} else if (knativeChannel) { return "knative:channel/" +
Re: [PR] CAMEL-20403: Support Knative Broker reference in Pipe YAML [camel]
davsclaus merged PR #13078: URL: https://github.com/apache/camel/pull/13078 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [CAMEL-20405] renamed classes from *IntegrationTest.java to *IT.java [camel]
davsclaus commented on PR #13082: URL: https://github.com/apache/camel/pull/13082#issuecomment-1936943144 > failsafe Otavio do you mean that some of the component have customized configuration for `failsafe-plugin` in their pom? It seems so as if you do a `git grep failsafe-plugin` then there are about 10 components. But even so what changes are we looking for to do? Would it be if they do some naming matching where they expected names of xxxIntegrationTest style, and this PR renames the names back into xxxIT style. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) [camel-spring-boot]
oscerd closed pull request #1084: [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) URL: https://github.com/apache/camel-spring-boot/pull/1084 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] memory increase in camel quarkus [camel-quarkus]
jamesnetherton commented on issue #5743: URL: https://github.com/apache/camel-quarkus/issues/5743#issuecomment-1936922982 > a microservice made in Quarkus Camel Please can you provide some more details? - Which version of Quarkus is used? - Which extensions do you use? - What does the Camel route configuration look like? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org