(camel) branch main updated: Create a langchain4j-core module
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 a58b929167f Create a langchain4j-core module a58b929167f is described below commit a58b929167fa55ceced2a20f4d8b4163485f6eba Author: Luca Burgazzoli AuthorDate: Mon May 27 19:01:41 2024 +0200 Create a langchain4j-core module --- bom/camel-bom/pom.xml | 5 ++ catalog/camel-allcomponents/pom.xml| 5 ++ components/camel-ai/camel-langchain4j-chat/pom.xml | 5 +- .../pom.xml| 35 +-- .../core/LangChain4jConverterLoader.java | 54 + .../services/org/apache/camel/TypeConverterLoader | 2 + .../services/org/apache/camel/other.properties | 7 +++ .../src/generated/resources/langchain4j-core.json | 15 + .../component/langchain4j/core/LangChain4j.java| 25 .../langchain4j/core/LangChain4jConverter.java | 67 ++ .../langchain4j/core/LangChain4jConverterTest.java | 51 .../src/test/resources/log4j2.properties | 35 +++ .../camel-ai/camel-langchain4j-embeddings/pom.xml | 5 +- components/camel-ai/pom.xml| 1 + .../others/examples/json/langchain4j-core.json | 1 + parent/pom.xml | 5 ++ 16 files changed, 296 insertions(+), 22 deletions(-) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index e62328dcf25..a250592fbbd 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -1297,6 +1297,11 @@ camel-langchain4j-chat 4.7.0-SNAPSHOT + +org.apache.camel +camel-langchain4j-core +4.7.0-SNAPSHOT + org.apache.camel camel-langchain4j-embeddings diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index 2dfc5615942..daf1adf8836 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -1107,6 +1107,11 @@ camel-langchain4j-chat ${project.version} + +org.apache.camel +camel-langchain4j-core +${project.version} + org.apache.camel camel-langchain4j-embeddings diff --git a/components/camel-ai/camel-langchain4j-chat/pom.xml b/components/camel-ai/camel-langchain4j-chat/pom.xml index a5ac9a1ba94..604500a8feb 100644 --- a/components/camel-ai/camel-langchain4j-chat/pom.xml +++ b/components/camel-ai/camel-langchain4j-chat/pom.xml @@ -40,9 +40,8 @@ camel-support -dev.langchain4j -langchain4j -${langchain4j-version} +org.apache.camel +camel-langchain4j-core diff --git a/components/camel-ai/camel-langchain4j-chat/pom.xml b/components/camel-ai/camel-langchain4j-core/pom.xml similarity index 72% copy from components/camel-ai/camel-langchain4j-chat/pom.xml copy to components/camel-ai/camel-langchain4j-core/pom.xml index a5ac9a1ba94..734bf4b554b 100644 --- a/components/camel-ai/camel-langchain4j-chat/pom.xml +++ b/components/camel-ai/camel-langchain4j-core/pom.xml @@ -28,43 +28,46 @@ 4.7.0-SNAPSHOT -camel-langchain4j-chat +camel-langchain4j-core jar -Camel :: LangChain4j :: Chat -LangChain4j Chat component +Camel :: LangChain4j :: Core +LangChain4j Core - + +4.7.0 +ai +LangChain4j Core +Experimental + + org.apache.camel camel-support dev.langchain4j -langchain4j +langchain4j-core ${langchain4j-version} - + + org.apache.camel -camel-test-spring-junit5 +camel-test-junit5 test -dev.langchain4j -langchain4j-ollama -${langchain4j-version} +org.junit.jupiter +junit-jupiter test -org.apache.camel -camel-test-infra-ollama -${project.version} -test-jar +org.assertj +assertj-core +${assertj-version} test - - diff --git a/components/camel-ai/camel-langchain4j-core/src/generated/java/org/apache/camel/component/langchain4j/core/LangChain4jConverterLoader.java b/components/camel-ai/camel-langchain4j-core/src/generated/java/org/apache/camel/component/langchain4j/core/LangChain4jConverterLoader.java new file mode 100644 index 000..ee39897cdc5 --- /dev/null +++ b/components/camel-ai/camel-langchain4j-core
(camel-k) branch main updated (a95fd2b26 -> 49cc8c403)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from a95fd2b26 chore: nightly automatic updates add fe094ce92 feat(lint): remove commented out entry add 26cf869e8 feat(lint): enable execinquery add 44a999315 feat(lint): keep whitespace disabled add 8fc3dcd49 feat(lint): enable wastedassign add cebabc0d9 feat(lint): keep tagliatelle disabled add 145cf13b5 feat(lint): enable nolintlint add 49cc8c403 feat(lint): keep lll disabled No new revisions were added by this update. Summary of changes: .golangci.yml | 18 ++ cmd/util/json-schema-gen/main.go | 2 +- pkg/apis/camel/v1/common_types.go | 3 ++- pkg/apis/camel/v1/common_types_support.go | 1 - pkg/apis/camel/v1/maven_types_support.go | 2 +- pkg/apis/camel/v1/trait/container.go | 3 +-- pkg/apis/camel/v1/trait/jolokia.go| 3 +-- pkg/apis/camel/v1/trait/mount.go | 3 +-- pkg/apis/camel/v1/trait/route.go | 3 +-- pkg/builder/s2i.go| 2 +- pkg/builder/types.go | 2 +- pkg/cmd/config.go | 1 - pkg/cmd/install.go| 2 +- pkg/cmd/log.go| 3 ++- pkg/cmd/root.go | 3 ++- pkg/cmd/run.go| 10 -- pkg/cmd/source/util.go| 3 ++- pkg/controller/integrationkit/build.go| 2 +- pkg/event/manager.go | 2 +- pkg/install/cluster.go| 4 +--- pkg/install/operator.go | 2 +- pkg/trait/jvm.go | 4 +++- pkg/trait/logging.go | 7 +++ pkg/trait/mount.go| 1 - pkg/trait/quarkus.go | 2 +- pkg/trait/trait_types.go | 3 ++- pkg/util/bindings/api.go | 2 +- pkg/util/bindings/api_v1alpha1.go | 3 ++- pkg/util/bindings/kamelet.go | 2 -- pkg/util/cancellable/cancellable.go | 2 +- pkg/util/test/client.go | 15 +++ 31 files changed, 59 insertions(+), 56 deletions(-)
(camel-k) branch main updated (0e97aeee2 -> dab74ed08)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 0e97aeee2 chore: nightly automatic updates add dab74ed08 feat(lint): enabe goconst linter No new revisions were added by this update. Summary of changes: .golangci.yml | 2 +- addons/telemetry/telemetry.go | 8 +--- addons/telemetry/telemetry_test.go | 3 ++- addons/vault/aws/aws_secrets_manager_test.go | 9 + addons/vault/gcp/gcp_secret_manager_test.go| 5 +++-- e2e/advanced/main_test.go | 5 +++-- e2e/common/cli/main_test.go| 3 ++- e2e/common/main_test.go| 7 --- e2e/common/traits/health_test.go | 2 +- e2e/support/test_support.go| 9 + pkg/builder/project_test.go| 6 -- pkg/builder/quarkus.go | 6 -- pkg/builder/quarkus_test.go| 8 +--- pkg/cmd/bind.go| 1 + pkg/controller/integrationplatform/catalog_test.go | 6 -- pkg/install/common.go | 1 + pkg/install/operator.go| 3 ++- pkg/trait/builder.go | 4 +++- pkg/trait/camel_test.go| 7 --- pkg/trait/istio.go | 4 +++- pkg/trait/istio_test.go| 9 + pkg/trait/jolokia_test.go | 3 ++- pkg/trait/jvm.go | 4 +++- pkg/trait/kamelets.go | 3 ++- pkg/trait/kamelets_support.go | 3 ++- pkg/trait/knative.go | 8 +--- pkg/trait/knative_service.go | 3 ++- pkg/trait/knative_service_test.go | 7 --- pkg/trait/knative_test.go | 5 +++-- pkg/trait/logging.go | 17 + pkg/trait/logging_test.go | 9 + pkg/trait/mount.go | 3 ++- pkg/trait/openapi.go | 5 +++-- pkg/trait/platform.go | 3 ++- pkg/trait/platform_test.go | 3 ++- pkg/trait/quarkus.go | 5 +++-- pkg/trait/quarkus_test.go | 20 +++- pkg/trait/route_test.go| 5 +++-- pkg/trait/service_binding.go | 7 --- pkg/trait/service_binding_test.go | 3 ++- pkg/trait/trait_configure_test.go | 5 +++-- pkg/trait/trait_test.go| 5 +++-- pkg/trait/trait_types.go | 6 ++ pkg/util/{config/config.go => boolean/boolean.go} | 7 ++- pkg/util/camel/camel_runtime_test.go | 4 +++- pkg/util/source/inspector_xml.go | 2 ++ 46 files changed, 155 insertions(+), 98 deletions(-) copy pkg/util/{config/config.go => boolean/boolean.go} (91%)
(camel-k) branch main updated: feat(lint): enabe magic number detector (mld)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 8fa8846a7 feat(lint): enabe magic number detector (mld) 8fa8846a7 is described below commit 8fa8846a71cd9e31bd1e0c29279e3931b99b2d61 Author: Luca Burgazzoli AuthorDate: Fri May 10 14:56:31 2024 +0200 feat(lint): enabe magic number detector (mld) --- .golangci.yml | 37 +- addons/keda/duck/v1alpha1/zz_generated.deepcopy.go | 2 +- cmd/util/json-schema-gen/main.go | 4 ++- e2e/advanced/deployment_test.go| 3 +- e2e/advanced/dump_test.go | 3 +- e2e/install/cli/uninstall_test.go | 5 +-- e2e/knative/gc_test.go | 3 +- e2e/knative/openapi_test.go| 3 +- e2e/native/native_binding_test.go | 3 +- e2e/support/test_util.go | 3 +- pkg/apis/camel/v1/trait/zz_generated.deepcopy.go | 2 +- pkg/apis/camel/v1/zz_generated.deepcopy.go | 1 + pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 3 +- pkg/builder/image.go | 8 +++-- pkg/builder/project.go | 5 ++- pkg/builder/quarkus.go | 4 ++- pkg/cmd/builder/builder.go | 4 ++- pkg/cmd/operator.go| 10 -- pkg/cmd/util_config.go | 6 ++-- pkg/controller/build/build_controller.go | 9 -- pkg/controller/build/recovery.go | 16 +++--- pkg/controller/catalog/catalog_controller.go | 6 +++- pkg/controller/integrationkit/build.go | 6 +++- .../integrationkit/integrationkit_controller.go| 6 +++- .../integrationplatform_controller.go | 6 +++- .../integrationprofile_controller.go | 6 +++- pkg/install/cluster.go | 3 ++ pkg/kamelet/repository/repository.go | 1 + pkg/platform/defaults.go | 9 -- pkg/trait/affinity.go | 7 +++- pkg/trait/builder.go | 5 +-- pkg/trait/camel.go | 4 ++- pkg/trait/container.go | 6 ++-- pkg/trait/cron.go | 25 +-- pkg/trait/dependencies.go | 7 +++- pkg/trait/deployer.go | 7 +++- pkg/trait/deployment.go| 14 ++-- pkg/trait/environment.go | 5 ++- pkg/trait/error_handler.go | 7 +++- pkg/trait/gc.go| 7 +++- pkg/trait/health.go| 5 ++- pkg/trait/ingress.go | 7 +++- pkg/trait/init.go | 9 -- pkg/trait/istio.go | 7 +++- pkg/trait/jolokia.go | 11 +-- pkg/trait/jvm.go | 17 +++--- pkg/trait/kamelets.go | 6 ++-- pkg/trait/knative.go | 12 --- pkg/trait/knative_service.go | 8 +++-- pkg/trait/logging.go | 5 ++- pkg/trait/mount.go | 7 +++- pkg/trait/openapi.go | 11 +-- pkg/trait/owner.go | 7 +++- pkg/trait/pdb.go | 7 +++- pkg/trait/platform.go | 7 +++- pkg/trait/pod.go | 4 ++- pkg/trait/prometheus.go| 7 +++- pkg/trait/pull_secret.go | 7 +++- pkg/trait/quarkus.go | 14 pkg/trait/registry.go | 7 +++- pkg/trait/route.go | 7 +++- pkg/trait/security_context.go | 5 +-- pkg/trait/service.go | 9 -- pkg/trait/service_binding.go | 5 ++- pkg/trait/toleration.go| 7 +++- pkg/util/camel/camel_dependencies.go | 2 ++ pkg/util/io/io.go | 28 pkg/util/jvm/keystore.go | 6 +++- pkg/util/knative/uri.go| 1 + pkg/util/kubernetes/log/annotation_scraper.go | 6 +++- pkg/util/maven/maven_command.go| 2 ++ pkg/util/registry/registry.go
(camel-k) branch main updated: chore(tools): update golangci-lint to v1.58.1
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 5380b4ff3 chore(tools): update golangci-lint to v1.58.1 5380b4ff3 is described below commit 5380b4ff307b2e3d8e511d4c37928bf5aed34bab Author: Luca Burgazzoli AuthorDate: Fri May 10 10:58:05 2024 +0200 chore(tools): update golangci-lint to v1.58.1 --- script/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Makefile b/script/Makefile index 638b08ed4..e2acdb16f 100644 --- a/script/Makefile +++ b/script/Makefile @@ -33,7 +33,7 @@ CODEGEN_VERSION := v0.27.4 OPERATOR_SDK_VERSION := v1.28.0 KUSTOMIZE_VERSION := v4.5.4 OPM_VERSION := v1.24.0 -LINTER_VERSION ?= v1.58.0 +LINTER_VERSION ?= v1.58.1 GOVULNCHECK_VERSION ?= latest LINTER ?= $(LOCALBIN)/golangci-lint
(camel-k) 02/02: chore: add some test logging to the operator_metrics_test for troubleshooting
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 46ec143c38d09e542acabc737e52cc27b2e89c7d Author: Luca Burgazzoli AuthorDate: Thu May 9 08:10:59 2024 +0200 chore: add some test logging to the operator_metrics_test for troubleshooting --- e2e/advanced/operator_metrics_test.go | 12 1 file changed, 12 insertions(+) diff --git a/e2e/advanced/operator_metrics_test.go b/e2e/advanced/operator_metrics_test.go index 376aeb0cc..5efa4c163 100644 --- a/e2e/advanced/operator_metrics_test.go +++ b/e2e/advanced/operator_metrics_test.go @@ -262,6 +262,9 @@ func TestMetrics(t *testing.T) { platformErroredCount = *platformErrored.Histogram.SampleCount } + t.Logf("duration metric (integration platform) platformReconciliations=%d, platformReconciledCount=%d, platformRequeuedCount=%d platformErroredCount=%d", + platformReconciliations, platformReconciledCount, platformRequeuedCount, platformErroredCount) + g.Expect(platformReconciliations).To(BeNumerically("==", platformReconciledCount+platformRequeuedCount+platformErroredCount)) // Count the number of Integration reconciliations @@ -322,6 +325,9 @@ func TestMetrics(t *testing.T) { integrationErroredCount = *integrationErrored.Histogram.SampleCount } + t.Logf("duration metric (integration) integrationReconciliations=%d, integrationReconciledCount=%d, integrationRequeuedCount=%d integrationErroredCount=%d", + integrationReconciliations, integrationReconciledCount, integrationRequeuedCount, integrationErroredCount) + g.Expect(integrationReconciliations).To(BeNumerically("==", integrationReconciledCount+integrationRequeuedCount+integrationErroredCount)) // Count the number of IntegrationKit reconciliations @@ -368,6 +374,9 @@ func TestMetrics(t *testing.T) { integrationKitRequeuedCount = *integrationKitRequeued.Histogram.SampleCount } + t.Logf("duration metric (integration kit) integrationKitReconciliations=%d, integrationKitReconciledCount=%d, integrationKitRequeuedCount=%d", + integrationKitReconciliations, integrationKitReconciledCount, integrationKitRequeuedCount) + g.Expect(integrationKitReconciliations).To(BeNumerically("==", integrationKitReconciledCount+integrationKitRequeuedCount)) // Count the number of Build reconciliations @@ -411,6 +420,9 @@ func TestMetrics(t *testing.T) { buildRequeuedCount = *buildRequeued.Histogram.SampleCount } + t.Logf("duration metric (build) buildReconciliations=%d, buildReconciledCount=%d, buildRequeuedCount=%d", + buildReconciliations, buildReconciledCount, buildRequeuedCount) + g.Expect(buildReconciliations).To(BeNumerically("==", buildReconciledCount+buildRequeuedCount)) })
(camel-k) branch main updated (74139ed8b -> 46ec143c3)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 74139ed8b chore: cleanup pkg/util/tar package new 1fd641a4f Review permission check #5210 new 46ec143c3 chore: add some test logging to the operator_metrics_test for troubleshooting 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: addons/master/master.go | 22 ++--- addons/master/master_test.go | 2 +- e2e/advanced/operator_metrics_test.go | 12 +++ pkg/cmd/operator/operator.go | 24 -- pkg/event/broadcaster.go | 62 --- script/Makefile | 1 + 6 files changed, 17 insertions(+), 106 deletions(-) delete mode 100644 pkg/event/broadcaster.go
(camel-k) 01/02: Review permission check #5210
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 1fd641a4ff02cca6f14f451ebc4a7a918d99aab7 Author: Luca Burgazzoli AuthorDate: Wed May 8 09:35:50 2024 +0200 Review permission check #5210 --- addons/master/master.go | 22 +++- addons/master/master_test.go | 2 +- pkg/cmd/operator/operator.go | 24 - pkg/event/broadcaster.go | 62 script/Makefile | 1 + 5 files changed, 5 insertions(+), 106 deletions(-) diff --git a/addons/master/master.go b/addons/master/master.go index 92fec2f16..9fc0fe293 100644 --- a/addons/master/master.go +++ b/addons/master/master.go @@ -77,12 +77,8 @@ func NewMasterTrait() trait.Trait { } const ( - masterComponent = "master" -) - -var ( - leaseResourceType = "Lease" - configMapResourceType = "ConfigMap" + masterComponent = "master" + leaseResourceType = "Lease" ) func (t *masterTrait) Configure(e *trait.Environment) (bool, *trait.TraitCondition, error) { @@ -132,15 +128,7 @@ func (t *masterTrait) Configure(e *trait.Environment) (bool, *trait.TraitConditi } if t.ResourceType == nil { - canUseLeases, err := t.canUseLeases(e) - if err != nil { - return false, nil, err - } - if canUseLeases { - t.ResourceType = - } else { - t.ResourceType = - } + t.ResourceType = pointer.String(leaseResourceType) } if t.LabelKey == nil { @@ -230,10 +218,6 @@ func (t *masterTrait) setCatalogConfiguration(e *trait.Environment) { } } -func (t *masterTrait) canUseLeases(e *trait.Environment) (bool, error) { - return kubernetes.CheckPermission(e.Ctx, t.Client, "coordination.k8s.io", "leases", e.Integration.Namespace, "", "create") -} - func findAdditionalDependencies(e *trait.Environment, meta metadata.IntegrationMetadata) []string { var dependencies []string for _, endpoint := range meta.FromURIs { diff --git a/addons/master/master_test.go b/addons/master/master_test.go index c396af1db..c80b2abd6 100644 --- a/addons/master/master_test.go +++ b/addons/master/master_test.go @@ -101,7 +101,7 @@ func TestMasterOn(t *testing.T) { err = mt.Apply() require.NoError(t, err) assert.Equal(t, "test-lock", environment.ApplicationProperties["camel.k.master.resourceName"]) - assert.Equal(t, "ConfigMap", environment.ApplicationProperties["camel.k.master.resourceType"]) + assert.Equal(t, leaseResourceType, environment.ApplicationProperties["camel.k.master.resourceType"]) assert.Equal(t, "camel.apache.org/integration", environment.ApplicationProperties["camel.k.master.labelKey"]) assert.Equal(t, "test", environment.ApplicationProperties["camel.k.master.labelValue"]) assert.Equal(t, "${camel.k.master.resourceName}", environment.ApplicationProperties["quarkus.camel.cluster.kubernetes.resource-name"]) diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go index cf571e30e..ad892e41e 100644 --- a/pkg/cmd/operator/operator.go +++ b/pkg/cmd/operator/operator.go @@ -36,14 +36,12 @@ import ( appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" - coordination "k8s.io/api/coordination/v1" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/client-go/tools/leaderelection/resourcelock" - "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/cache" ctrl "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" @@ -61,7 +59,6 @@ import ( "github.com/apache/camel-k/v2/pkg/client" "github.com/apache/camel-k/v2/pkg/controller" "github.com/apache/camel-k/v2/pkg/controller/synthetic" - "github.com/apache/camel-k/v2/pkg/event" "github.com/apache/camel-k/v2/pkg/install" "github.com/apache/camel-k/v2/pkg/platform" "github.com/apache/camel-k/v2/pkg/util/defaults" @@ -145,20 +142,6 @@ func Run(h
(camel-k) branch main updated (8403c2994 -> 74139ed8b)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 8403c2994 fix(maven): move check for MAVEN_CMD before maven wrapper setup new 745761bc8 chore: cleanup pkg/util/maven package new 74139ed8b chore: cleanup pkg/util/tar package 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: pkg/builder/jib.go | 2 +- pkg/cmd/dump.go | 2 +- pkg/util/maven/maven_command.go | 6 +++--- pkg/util/maven/maven_log.go | 16 ++-- pkg/util/maven/maven_log_test.go | 2 +- pkg/util/maven/maven_project.go | 6 +++--- pkg/util/maven/maven_repositories.go | 7 +++ pkg/util/tar/util_compress.go| 24 +++- 8 files changed, 37 insertions(+), 28 deletions(-)
(camel-k) 02/02: chore: cleanup pkg/util/tar package
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 74139ed8bbb271534c871b4ab9c77fff511cfecc Author: Luca Burgazzoli AuthorDate: Wed May 8 16:07:46 2024 +0200 chore: cleanup pkg/util/tar package --- pkg/cmd/dump.go | 2 +- pkg/util/tar/util_compress.go | 24 +++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/pkg/cmd/dump.go b/pkg/cmd/dump.go index d9351d7f0..187b73f1a 100644 --- a/pkg/cmd/dump.go +++ b/pkg/cmd/dump.go @@ -75,7 +75,7 @@ func (o *dumpCmdOptions) dump(cmd *cobra.Command, args []string) error { if err != nil { return err } - tar.CreateTarFile([]string{file.Name()}, "dump."+file.Name()+"."+time.Now().Format(time.RFC3339)+".tar.gz", cmd) + tar.CreateTarFile([]string{file.Name()}, "dump."+file.Name()+"."+time.Now().Format(time.RFC3339)+".tar.gz", cmd.OutOrStdout()) return nil }) } else { diff --git a/pkg/util/tar/util_compress.go b/pkg/util/tar/util_compress.go index 3388d124a..9d97e4e50 100644 --- a/pkg/util/tar/util_compress.go +++ b/pkg/util/tar/util_compress.go @@ -24,27 +24,27 @@ import ( "io" "os" - "github.com/spf13/cobra" + "github.com/apache/camel-k/v2/pkg/util" ) -func CreateTarFile(fileNames []string, archiveName string, cmd *cobra.Command) { +func CreateTarFile(fileNames []string, archiveName string, buf io.Writer) { out, err := os.Create(archiveName) if err != nil { - fmt.Fprintln(cmd.ErrOrStderr(), "Error writing archive:", err.Error()) + _, _ = fmt.Fprintln(buf, "Error writing archive:", err.Error()) } - defer out.Close() + defer util.CloseQuietly(out) err = createArchiveFile(fileNames, out) if err != nil { - fmt.Fprintln(cmd.ErrOrStderr(), "Error writing archive:", err.Error()) + _, _ = fmt.Fprintln(buf, "Error writing archive:", err.Error()) } } func createArchiveFile(files []string, buf io.Writer) error { gw := gzip.NewWriter(buf) - defer gw.Close() + defer util.CloseQuietly(gw) tw := tar.NewWriter(gw) - defer tw.Close() + defer util.CloseQuietly(tw) // Iterate over files and add them to the tar archive for _, file := range files { @@ -61,7 +61,8 @@ func addEntryToArchive(tw *tar.Writer, filename string) error { if err != nil { return err } - defer file.Close() + defer util.CloseQuietly(file) + info, err := file.Stat() if err != nil { return err @@ -79,6 +80,11 @@ func addEntryToArchive(tw *tar.Writer, filename string) error { if err != nil { return err } - defer os.Remove(filename) + + err = os.Remove(filename) + if err != nil { + return err + } + return nil }
(camel-k) 01/02: chore: cleanup pkg/util/maven package
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 745761bc83f6c823e660609c88fb76959fea4cc0 Author: Luca Burgazzoli AuthorDate: Wed May 8 15:27:24 2024 +0200 chore: cleanup pkg/util/maven package --- pkg/builder/jib.go | 2 +- pkg/util/maven/maven_command.go | 6 +++--- pkg/util/maven/maven_log.go | 16 ++-- pkg/util/maven/maven_log_test.go | 2 +- pkg/util/maven/maven_project.go | 6 +++--- pkg/util/maven/maven_repositories.go | 7 +++ 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/pkg/builder/jib.go b/pkg/builder/jib.go index 71c6d6614..87786ee2c 100644 --- a/pkg/builder/jib.go +++ b/pkg/builder/jib.go @@ -135,7 +135,7 @@ func (t *jibTask) Do(ctx context.Context) v1.BuildStatus { cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_CONFIG_HOME=%s/jib", mavenDir)) cmd.Dir = mavenDir - myerror := util.RunAndLog(ctx, cmd, maven.MavenLogHandler, maven.MavenLogHandler) + myerror := util.RunAndLog(ctx, cmd, maven.LogHandler, maven.LogHandler) if myerror != nil { log.Errorf(myerror, "jib integration image containerization did not run successfully") diff --git a/pkg/util/maven/maven_command.go b/pkg/util/maven/maven_command.go index acaeb6c1f..1bc29cf71 100644 --- a/pkg/util/maven/maven_command.go +++ b/pkg/util/maven/maven_command.go @@ -143,7 +143,7 @@ func (c *Command) Do(ctx context.Context) error { return err } - return util.RunAndLog(ctx, cmd, MavenLogHandler, MavenLogHandler) + return util.RunAndLog(ctx, cmd, LogHandler, LogHandler) } func NewContext(buildDir string) Context { @@ -190,7 +190,7 @@ func (c *Context) AddSystemProperty(name string, value string) { } func generateProjectStructure(context Context, project Project) error { - if err := util.WriteFileWithBytesMarshallerContent(context.Path, "pom.xml", project); err != nil { + if err := util.WriteFileWithBytesMarshallerContent(context.Path, "pom.xml", ); err != nil { return err } @@ -244,7 +244,7 @@ func generateProjectStructure(context Context, project Project) error { func (c *Command) prepareMavenWrapper(ctx context.Context) error { cmd := exec.CommandContext(ctx, "cp", "--recursive", "/usr/share/maven/mvnw/.", ".") cmd.Dir = c.context.Path - return util.RunAndLog(ctx, cmd, MavenLogHandler, MavenLogHandler) + return util.RunAndLog(ctx, cmd, LogHandler, LogHandler) } // ParseGAV decodes the provided Maven GAV into the corresponding Dependency. diff --git a/pkg/util/maven/maven_log.go b/pkg/util/maven/maven_log.go index e47b15cd8..a9d58d2fc 100644 --- a/pkg/util/maven/maven_log.go +++ b/pkg/util/maven/maven_log.go @@ -24,10 +24,9 @@ import ( "github.com/apache/camel-k/v2/pkg/util/log" ) -// nolint: stylecheck type mavenLog struct { Levelstring `json:"level"` - Ts string `json:"ts"` + TS string `json:"ts"` Logger string `json:"logger"` Msg string `json:"msg"` Classstring `json:"class"` @@ -48,10 +47,10 @@ const ( var mavenLogger = log.WithName("maven.build") -func MavenLogHandler(s string) string { - mavenLog, parseError := parseLog(s) +func LogHandler(s string) string { + l, parseError := parseLog(s) if parseError == nil { - normalizeLog(mavenLog) + normalizeLog(l) } else { // Why we are ignoring the parsing errors here: there are a few scenarios where this would likely occur. // For example, if something outside of Maven outputs something (i.e.: the JDK, a misbehaved plugin, @@ -69,8 +68,13 @@ func MavenLogHandler(s string) string { func parseLog(line string) (mavenLog, error) { var l mavenLog + err := json.Unmarshal([]byte(line), ) - return l, err + if err != nil { + return l, err + } + + return l, nil } func normalizeLog(mavenLog mavenLog) { diff --git a/pkg/util/maven/maven_log_test.go b/pkg/util/maven/maven_log_test.go index 2fa74dd2a..46fadfdb0 100644 --- a/pkg/util/maven/maven_log_test.go +++ b/pkg/util/maven/maven_log_test.go @@ -34,7 +34,7 @@ func TestRunAndLogErrorMvn(t *testing.T) { } cmd := exec.CommandContext(context.Background(), mavenCmd, "package", "-B") - err := util.RunAndLog(context.Background(), cmd, MavenLogHandler, MavenLogHandler) + err := util.RunAndLog(context.Background(), cmd, LogHandler, LogHandler) require.Error(t, err) require.
(camel-k) branch main updated: chore: cleanup golagci-lint configuration
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new fe87df368 chore: cleanup golagci-lint configuration fe87df368 is described below commit fe87df368ca3bb05011b8d5cacaf4995f524586f Author: Luca Burgazzoli AuthorDate: Wed May 8 22:49:39 2024 +0200 chore: cleanup golagci-lint configuration --- .golangci.yml | 16 +--- script/Makefile | 13 + 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index da5216147..21b1f5b97 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -27,7 +27,6 @@ linters: enable-all: true disable: - cyclop -- deadcode - depguard - dupl - exhaustive @@ -39,36 +38,22 @@ linters: - gochecknoglobals - gochecknoinits - gocognit -- goconst - gocyclo - godox - err113 - gofumpt -- golint - gomnd -- gomoddirectives -- ifshort -- interfacer - ireturn - lll -- maligned -- nakedret - nestif - nilnil - nlreturn - nolintlint -- nosnakecase - paralleltest - revive -- rowserrcheck -- scopelint -- structcheck -- sqlclosecheck - tagalign - tagliatelle -- tenv - testpackage -- varcheck - varnamelen - wastedassign - whitespace @@ -79,3 +64,4 @@ linters: # lint violation make a lot of sense so we should re-enable the lints below and work to fix the findings - mnd - perfsprint +- goconst diff --git a/script/Makefile b/script/Makefile index db79a62ee..4740e028a 100644 --- a/script/Makefile +++ b/script/Makefile @@ -38,6 +38,7 @@ GOVULNCHECK_VERSION ?= latest LINTER ?= $(LOCALBIN)/golangci-lint GOVULNCHECK ?= $(LOCALBIN)/govulncheck +GOIMPORT ?= $(LOCALBIN)/goimports BASE_IMAGE := eclipse-temurin:17 LOCAL_REPOSITORY := /etc/maven/m2 @@ -443,6 +444,11 @@ lint-fix: golangci-lint vuln: govulncheck @$(GOVULNCHECK) ./... +.PHONY: fmt +fmt: goimport + $(GOIMPORT) -l -w . + go fmt ./... + dir-licenses: ./script/vendor-license-directory.sh @@ -743,3 +749,10 @@ govulncheck: $(GOVULNCHECK) $(GOVULNCHECK): $(LOCALBIN) @test -s $(GOVULNCHECK) || \ GOBIN=$(LOCALBIN) go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION) + +.PHONY: goimport +goimport: $(GOIMPORT) +$(GOIMPORT): $(LOCALBIN) + @test -s $(LOCALBIN)/goimport || \ + GOBIN=$(LOCALBIN) go install golang.org/x/tools/cmd/goimports@latest +
(camel-k) branch main updated: fix(maven): move check for MAVEN_CMD before maven wrapper setup
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 8403c2994 fix(maven): move check for MAVEN_CMD before maven wrapper setup 8403c2994 is described below commit 8403c29944cf0aac8f47c67d8c8408655844dc98 Author: Luca Burgazzoli AuthorDate: Wed May 8 12:43:18 2024 +0200 fix(maven): move check for MAVEN_CMD before maven wrapper setup MAVEN_CMD has the precendence over the maven wrapper, either set via the MAVEN_WRAPPER env var or copied from a local path. This commit changes the evaluation order to reflect ordering which avoid to perform a useless file copy and also make it easy to run the operator off cluster since the mvnw location may not exist --- pkg/platform/platform.go| 5 +++-- pkg/util/maven/maven_command.go | 22 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go index e4f655bd0..c9ba4ea64 100644 --- a/pkg/platform/platform.go +++ b/pkg/platform/platform.go @@ -142,6 +142,7 @@ func findLocal(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.I operatorID := defaults.OperatorID() if operatorID != "" { if p, err := get(ctx, c, operatorNamespace, operatorID); err == nil { + log.Debugf("Found integration platform %s for operator %s in namespace %s", operatorID, operatorID, operatorNamespace) return p, nil } } @@ -156,7 +157,7 @@ func findLocal(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.I for _, platform := range lst.Items { platform := platform // pin if IsActive() { - log.Debugf("Found active integration platform %s", platform.Name) + log.Debugf("Found active integration platform %s in namespace %s", platform.Name, namespace) return , nil } else { fallback = @@ -164,7 +165,7 @@ func findLocal(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.I } if fallback != nil { - log.Debugf("Found inactive integration platform %s", fallback.Name) + log.Debugf("Found inactive integration platform %s in namespace %s", fallback.Name, namespace) return fallback, nil } diff --git a/pkg/util/maven/maven_command.go b/pkg/util/maven/maven_command.go index df7e0856b..acaeb6c1f 100644 --- a/pkg/util/maven/maven_command.go +++ b/pkg/util/maven/maven_command.go @@ -44,19 +44,23 @@ func (c *Command) Do(ctx context.Context) error { return err } - if e, ok := os.LookupEnv("MAVEN_WRAPPER"); (ok && e == "true") || !ok { - // Prepare maven wrapper helps when running the builder as Pod as it makes - // the builder container, Maven agnostic - if err := c.prepareMavenWrapper(ctx); err != nil { - return err - } - } - - mvnCmd := "./mvnw" + mvnCmd := "" if c, ok := os.LookupEnv("MAVEN_CMD"); ok { mvnCmd = c } + if mvnCmd == "" { + if e, ok := os.LookupEnv("MAVEN_WRAPPER"); (ok && e == "true") || !ok { + // Prepare maven wrapper helps when running the builder as Pod as it makes + // the builder container, Maven agnostic + if err := c.prepareMavenWrapper(ctx); err != nil { + return err + } + } + + mvnCmd = "./mvnw" + } + args := make([]string, 0) args = append(args, c.context.AdditionalArguments...)
(camel-k) branch main updated: chore: use the same make targhet for lkint and vuln check locally and on ci
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 6be1c1bd3 chore: use the same make targhet for lkint and vuln check locally and on ci 6be1c1bd3 is described below commit 6be1c1bd3d4e694d49c8984fd4ec3bac047e23a5 Author: Luca Burgazzoli AuthorDate: Wed May 8 11:00:38 2024 +0200 chore: use the same make targhet for lkint and vuln check locally and on ci --- .github/workflows/security.yaml | 8 +++- .github/workflows/validate.yml | 11 --- .gitignore | 1 + script/Makefile | 43 + 4 files changed, 47 insertions(+), 16 deletions(-) diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index ed2877794..23d9b49e5 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -51,9 +51,7 @@ jobs: with: go-version-file: 'go.mod' check-latest: true - - name: Install govulncheck -run: go install golang.org/x/vuln/cmd/govulncheck@latest -shell: bash - - name: Run govulncheck -run: govulncheck ./... + - name: lint shell: bash +run: | + make vuln diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 91955e7d2..6a9a371e3 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -50,10 +50,7 @@ jobs: with: go-version-file: 'go.mod' check-latest: true - - name: golangci-lint -uses: golangci/golangci-lint-action@v4 -env: - GOGC: 20 -with: - version: v1.58.0 - args: --verbose --timeout 15m --config .golangci.yml + - name: lint +shell: bash +run: | + make lint diff --git a/.gitignore b/.gitignore index 6896b7685..ef4f286cf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /kamel.* /license-check /**/platform-check +bin/ # Config files /kamel-config.yaml diff --git a/script/Makefile b/script/Makefile index 08d4adf3f..db79a62ee 100644 --- a/script/Makefile +++ b/script/Makefile @@ -19,6 +19,10 @@ # SHELL := /bin/bash +MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) +LOCALBIN := $(PROJECT_PATH)/bin + VERSIONFILE := pkg/util/defaults/defaults.go VERSION ?= 2.4.0-SNAPSHOT LAST_RELEASED_IMAGE_NAME := camel-k-operator @@ -29,6 +33,12 @@ CODEGEN_VERSION := v0.27.4 OPERATOR_SDK_VERSION := v1.28.0 KUSTOMIZE_VERSION := v4.5.4 OPM_VERSION := v1.24.0 +LINTER_VERSION ?= v1.58.0 +GOVULNCHECK_VERSION ?= latest + +LINTER ?= $(LOCALBIN)/golangci-lint +GOVULNCHECK ?= $(LOCALBIN)/govulncheck + BASE_IMAGE := eclipse-temurin:17 LOCAL_REPOSITORY := /etc/maven/m2 IMAGE_NAME ?= docker.io/apache/camel-k @@ -394,6 +404,7 @@ clean: rm -f camel-k rm -f kamel rm -f *.test + rm -rf $(LOCALBIN) rm -rf build/_maven_output rm -rf build/_maven_overlay rm -rf build/_output @@ -418,11 +429,19 @@ OS := $(patsubst MINGW%,MSYS,$(OS)) OS_LOWER := $(shell echo $(OS) | tr '[:upper:]' '[:lower:]') endif -lint: - GOGC=$(LINT_GOGC) golangci-lint run --config .golangci.yml --out-format colored-tab --timeout $(LINT_DEADLINE) --verbose +check: lint vuln -lint-fix: - GOGC=$(LINT_GOGC) golangci-lint run --config .golangci.yml --out-format colored-tab --timeout $(LINT_DEADLINE) --fix +.PHONY: lint +lint: golangci-lint + GOGC=$(LINT_GOGC) $(LINTER) run --config .golangci.yml --out-format colored-tab --timeout $(LINT_DEADLINE) --verbose + +.PHONY: lint-fix +lint-fix: golangci-lint + GOGC=$(LINT_GOGC) $(LINTER) run --config .golangci.yml --out-format colored-tab --timeout $(LINT_DEADLINE) --fix + +.PHONY: vuln +vuln: govulncheck + @$(GOVULNCHECK) ./... dir-licenses: ./script/vendor-license-directory.sh @@ -708,3 +727,19 @@ bundle-index: opm yq OPM=$(OPM) BUNDLE_IMAGE=$(BUNDLE_IMAGE_NAME):$(CUSTOM_VERSION) CSV_NAME=$(CSV_PRODUCTION_NAME) \ CSV_SKIPS=$(CSV_SKIP_RANGE) CSV_REPLACES=$(CSV_REPLACES) CHANNELS="$(CHANNELS)" \ ./script/build_bundle_index.sh + +## Location to install dependencies to +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +.PHONY: golangci-lint +golangci-lint: $(LINTER) +$(LINTER): $(LOCALBIN) + @test -s $(LOCALBIN)/golangci-lint || \ + GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(LINTER_VERSION) + +.PHONY: govulncheck +govulncheck: $(GOVULNCHECK) +$(GOVULNCHECK): $(LOCALBIN) + @test -s $(GOVULNCHECK) || \ + GOBIN=$(LOCALBIN) go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION)
(camel-k) branch main updated (d012e861e -> 6ea797bf1)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from d012e861e Remove maven threads configuration based on GOMAXPROCS #5467 add 6ea797bf1 Incorrect content of the build/_maven_overlay directory causes the build project failure #5466 No new revisions were added by this update. Summary of changes: script/Makefile | 1 + 1 file changed, 1 insertion(+)
(camel-k) branch main updated (1e074db45 -> d012e861e)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 1e074db45 chore: update golagci-lint to v1.158.0 add d012e861e Remove maven threads configuration based on GOMAXPROCS #5467 No new revisions were added by this update. Summary of changes: pkg/util/maven/maven_command.go | 10 -- 1 file changed, 10 deletions(-)
(camel-k) branch main updated (3c0fc0d7b -> 1e074db45)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 3c0fc0d7b feat(trait): disable PodSecurityContext on KnativeService add 1e074db45 chore: update golagci-lint to v1.158.0 No new revisions were added by this update. Summary of changes: .github/workflows/validate.yml | 4 ++-- .golangci.yml| 10 -- addons/master/master.go | 10 +- pkg/apis/camel/v1/maven_types_support.go | 5 - pkg/cmd/run.go | 2 ++ script/Makefile | 4 ++-- 6 files changed, 23 insertions(+), 12 deletions(-)
(camel) branch main updated: [CAMEL-20675] camel-spring-boot: move cluster service implementations to dedicated starters
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 9837c406c4f [CAMEL-20675] camel-spring-boot: move cluster service implementations to dedicated starters 9837c406c4f is described below commit 9837c406c4f6ebea24d7a1b023b4e43986695305 Author: Luca Burgazzoli AuthorDate: Wed Apr 17 09:26:52 2024 +0200 [CAMEL-20675] camel-spring-boot: move cluster service implementations to dedicated starters --- .../ROOT/pages/camel-4x-upgrade-guide-4_6.adoc | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_6.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_6.adoc index 2a242b095bb..55f6d166c83 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_6.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_6.adoc @@ -102,4 +102,28 @@ route: uri: "direct:foo" steps: - to: "mock:bar" - \ No newline at end of file + + +=== camel-spring-boot + +The auto configuration of xref:clustering.adoc[Cluster Service] implementations has been moved to dedicated starters: + +[%header, cols="1,2"] +|=== +| Type | Starter +| Consul | camel-consul-cluster-service-starter +| File | camel-file-cluster-service-starter +| Infinispan | camel-infinispan-cluster-service-starter +| JGroups Lock | camel-jgroups-cluster-service-starter +| JGroups Raft | camel-jgroups-raft-cluster-service-starter +| Kubernetes | camel-kubernetes-cluster-service-starter +| Zookeeper| camel-zookeeper-cluster-service-starter +|=== + + +The Cluster Services are turned on by default unless they are explicit disabled, as example: + +[source, properties] + +camel.cluster.consul.enabled = false +
(camel) branch main updated: yaml-dsl: add a test with processor referenced by class name
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 379318b5d5b yaml-dsl: add a test with processor referenced by class name 379318b5d5b is described below commit 379318b5d5bd30f758d248ba9d7ec7b6558b36c9 Author: Luca Burgazzoli AuthorDate: Mon Mar 25 15:09:10 2024 +0100 yaml-dsl: add a test with processor referenced by class name --- .../org/apache/camel/dsl/yaml/ProcessTest.groovy | 26 ++ 1 file changed, 26 insertions(+) diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/ProcessTest.groovy b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/ProcessTest.groovy index 14fe85c5e7f..46f3d6c14b9 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/ProcessTest.groovy +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/ProcessTest.groovy @@ -16,6 +16,7 @@ */ package org.apache.camel.dsl.yaml +import org.apache.camel.component.mock.MockEndpoint import org.apache.camel.dsl.yaml.support.YamlTestSupport import org.apache.camel.model.ProcessDefinition @@ -35,4 +36,29 @@ class ProcessTest extends YamlTestSupport { ref == 'myProcessor' } } + +def "process with class ref"() { +setup: +loadRoutes ''' +- from: +uri: "direct:route" +steps: + - process: + ref: "#class:org.apache.camel.dsl.yaml.support.model.MyUppercaseProcessor" + - to: "mock:route" +''' + +withMock('mock:route') { +expectedBodiesReceived 'TEST' +} + +when: +context.start() + +withTemplate { +to('direct:route').withBody('test').send() +} +then: +MockEndpoint.assertIsSatisfied(context) +} }
(camel) branch main updated: feat(jbang): camel-k agent sub-command
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 f00ee7dd915 feat(jbang): camel-k agent sub-command f00ee7dd915 is described below commit f00ee7dd91566fa59c4673f37e6fb1809e149316 Author: Luca Burgazzoli AuthorDate: Tue Mar 5 15:56:26 2024 +0100 feat(jbang): camel-k agent sub-command --- dsl/camel-jbang/camel-jbang-plugin-k/pom.xml | 6 + .../camel/dsl/jbang/core/commands/k/Agent.java | 424 + .../dsl/jbang/core/commands/k/KubePlugin.java | 7 +- .../jbang/core/commands/k/support/Capability.java | 52 +++ .../jbang/core/commands/k/support/RuntimeType.java | 38 ++ .../commands/k/support/RuntimeTypeConverter.java | 26 ++ .../core/commands/k/support/SourceMetadata.java| 60 +++ .../commands/k/support/StubComponentResolver.java | 71 .../commands/k/support/StubDataFormatResolver.java | 61 +++ .../commands/k/support/StubLanguageResolver.java | 60 +++ .../k/support/StubTransformerResolver.java | 61 +++ .../camel/dsl/jbang/core/commands/k/AgentTest.java | 167 .../src/test/resources/route-i.yaml| 41 ++ 13 files changed, 1072 insertions(+), 2 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-k/pom.xml b/dsl/camel-jbang/camel-jbang-plugin-k/pom.xml index 1036a344e39..a843ff29a32 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-k/pom.xml +++ b/dsl/camel-jbang/camel-jbang-plugin-k/pom.xml @@ -72,6 +72,12 @@ ${kubernetes-client-version} test + +io.rest-assured +rest-assured +${rest-assured-version} +test + diff --git a/dsl/camel-jbang/camel-jbang-plugin-k/src/main/java/org/apache/camel/dsl/jbang/core/commands/k/Agent.java b/dsl/camel-jbang/camel-jbang-plugin-k/src/main/java/org/apache/camel/dsl/jbang/core/commands/k/Agent.java new file mode 100644 index 000..6111fa741a9 --- /dev/null +++ b/dsl/camel-jbang/camel-jbang-plugin-k/src/main/java/org/apache/camel/dsl/jbang/core/commands/k/Agent.java @@ -0,0 +1,424 @@ +/* + * 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.dsl.jbang.core.commands.k; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.TreeSet; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CountDownLatch; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.vertx.core.Vertx; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServer; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.Route; +import org.apache.camel.catalog.CamelCatalog; +import org.apache.camel.component.kamelet.KameletEndpoint; +import org.apache.camel.dsl.jbang.core.commands.CamelCommand; +import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain; +import org.apache.camel.dsl.jbang.core.commands.k.support.Capability; +import org.apache.camel.dsl.jbang.core.commands.k.support.RuntimeType; +import org.apache.camel.dsl.jbang.core.commands.k.support.RuntimeTypeConverter; +import org.apache.camel.dsl.jbang.core.commands.k.support.SourceMetadata; +import org.apache.camel.dsl.jbang.core.commands.k.support.StubComponentResolver; +import org.apache.camel.dsl.jbang.core.commands.k.support.StubDataFormatResolver; +import org.apache.camel.dsl.jbang.core.commands.k.support.StubLanguageResolver; +import org.apache.camel.dsl.jbang.core.commands.k.support.StubTransformerResolver; +import org.apache.camel.dsl.jbang.core.common.Ca
(camel) branch main updated: catalog: make catalog more type safe
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 fdf997b5938 catalog: make catalog more type safe fdf997b5938 is described below commit fdf997b5938b76b5b4bd893f9bd76ae7d8c42773 Author: Luca Burgazzoli AuthorDate: Mon Mar 18 13:48:16 2024 +0100 catalog: make catalog more type safe --- .../apache/camel/catalog/DefaultCamelCatalog.java | 75 +++--- .../catalog/impl/AbstractCachingCamelCatalog.java | 110 + .../camel/catalog/impl/AbstractCamelCatalog.java | 1 - .../catalog/impl/DefaultRuntimeCamelCatalog.java | 50 ++ .../org/apache/camel/tooling/model/BaseModel.java | 2 +- .../apache/camel/tooling/model/ComponentModel.java | 4 +- .../camel/tooling/model/DataFormatModel.java | 4 +- .../camel/tooling/model/DevConsoleModel.java | 4 +- .../org/apache/camel/tooling/model/EipModel.java | 4 +- .../java/org/apache/camel/tooling/model/Kind.java | 28 +- .../apache/camel/tooling/model/LanguageModel.java | 4 +- .../org/apache/camel/tooling/model/OtherModel.java | 4 +- .../camel/tooling/model/TransformerModel.java | 4 +- 13 files changed, 177 insertions(+), 117 deletions(-) diff --git a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 0d4e0b1a4a4..58fe3b1dbde 100644 --- a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -33,7 +33,7 @@ import java.util.function.Supplier; import java.util.regex.PatternSyntaxException; import java.util.stream.Stream; -import org.apache.camel.catalog.impl.AbstractCamelCatalog; +import org.apache.camel.catalog.impl.AbstractCachingCamelCatalog; import org.apache.camel.catalog.impl.CatalogHelper; import org.apache.camel.tooling.model.ArtifactModel; import org.apache.camel.tooling.model.BaseModel; @@ -56,7 +56,7 @@ import org.apache.camel.util.json.Jsoner; /** * Default {@link CamelCatalog}. */ -public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCatalog { +public class DefaultCamelCatalog extends AbstractCachingCamelCatalog implements CamelCatalog { private static final String MODELS_CATALOG = "org/apache/camel/catalog/models.properties"; private static final String SCHEMAS_XML = "org/apache/camel/catalog/schemas"; @@ -99,10 +99,6 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa private final Map extraDataFormats = new HashMap<>(); private final Map extraDataFormatsJSonSchema = new HashMap<>(); -// cache of operation -> result -private final Map cache = new HashMap<>(); - -private boolean caching; private VersionManager versionManager = new DefaultVersionManager(this); private RuntimeProvider runtimeProvider = new DefaultRuntimeProvider(this); @@ -119,7 +115,8 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa * @param caching whether to use cache */ public DefaultCamelCatalog(boolean caching) { -this.caching = caching; +super(caching); + setJSonSchemaResolver(new CamelCatalogJSonSchemaResolver( this, extraComponents, extraComponentsJSonSchema, extraDataFormats, extraDataFormatsJSonSchema)); } @@ -136,17 +133,17 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa this.runtimeProvider.setCamelCatalog(this); // invalidate the cache -cache.clear(); +super.clearCache(); } @Override public void enableCache() { -caching = true; +super.setCaching(true); } @Override public boolean isCaching() { -return caching; +return super.isCaching(); } @Override @@ -163,11 +160,11 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa public void addComponent(String name, String className) { extraComponents.put(name, className); // invalidate the cache -cache.remove(FIND_COMPONENT_NAMES); -cache.remove(FIND_COMPONENT_LABELS); -cache.remove(LIST_COMPONENTS_AS_JSON); +getCache().remove(FIND_COMPONENT_NAMES); +getCache().remove(FIND_COMPONENT_LABELS); +getCache().remove(LIST_COMPONENTS_AS_JSON); -cache.remove(SUMMARY_AS_JSON); +getCache().remove(SUMMARY_AS_JSON); } @Override @@ -182,11 +179,11 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa public void ad
(camel) branch main updated: CAMEL-20548: include a capability section to advertise which artifact provides a specific feature
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 e924867d1a1 CAMEL-20548: include a capability section to advertise which artifact provides a specific feature e924867d1a1 is described below commit e924867d1a153e3d1bf6af7b01cf1f950cf91ff3 Author: Luca Burgazzoli AuthorDate: Thu Mar 14 10:37:25 2024 +0100 CAMEL-20548: include a capability section to advertise which artifact provides a specific feature --- .../org/apache/camel/catalog/CamelCatalog.java | 12 +++ .../apache/camel/catalog/DefaultCamelCatalog.java | 25 ++ .../camel/catalog/DefaultRuntimeProvider.java | 22 +++ .../org/apache/camel/catalog/RuntimeProvider.java | 6 ++ .../apache/camel/catalog/capabilities.properties | 17 +++ .../org/apache/camel/catalog/CamelCatalogTest.java | 16 ++ .../org/apache/camel/tooling/model/EntityRef.java | 13 +++ .../java/org/apache/camel/tooling/model}/Kind.java | 2 +- 8 files changed, 102 insertions(+), 11 deletions(-) diff --git a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java index 4d2744e171b..1932fb506a5 100644 --- a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java +++ b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java @@ -20,6 +20,7 @@ import java.io.InputStream; import java.net.URISyntaxException; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import org.apache.camel.tooling.model.ArtifactModel; @@ -28,6 +29,8 @@ import org.apache.camel.tooling.model.ComponentModel; import org.apache.camel.tooling.model.DataFormatModel; import org.apache.camel.tooling.model.DevConsoleModel; import org.apache.camel.tooling.model.EipModel; +import org.apache.camel.tooling.model.EntityRef; +import org.apache.camel.tooling.model.Kind; import org.apache.camel.tooling.model.LanguageModel; import org.apache.camel.tooling.model.MainModel; import org.apache.camel.tooling.model.OtherModel; @@ -214,6 +217,11 @@ public interface CamelCatalog { */ List findOtherNames(); +/** + * Find all the capability names from the Camel catalog + */ +List findCapabilityNames(); + /** * @param kind the kind to look for * @return the list of part names of the given {@link Kind} available in this {@link CamelCatalog} @@ -640,4 +648,8 @@ public interface CamelCatalog { */ List camelQuarkusReleases(); +/** + * Find the entity the given capability maps to. + */ +Optional findCapabilityRef(String capability); } diff --git a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index aca19fb66e7..0d4e0b1a4a4 100644 --- a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -40,7 +41,9 @@ import org.apache.camel.tooling.model.ComponentModel; import org.apache.camel.tooling.model.DataFormatModel; import org.apache.camel.tooling.model.DevConsoleModel; import org.apache.camel.tooling.model.EipModel; +import org.apache.camel.tooling.model.EntityRef; import org.apache.camel.tooling.model.JsonMapper; +import org.apache.camel.tooling.model.Kind; import org.apache.camel.tooling.model.LanguageModel; import org.apache.camel.tooling.model.MainModel; import org.apache.camel.tooling.model.OtherModel; @@ -303,6 +306,11 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa return findNames(filter, this::findOtherNames, this::otherModel); } +@Override +public List findCapabilityNames() { +return List.copyOf(runtimeProvider.findCapabilities().keySet()); +} + private List findNames( String filter, Supplier> findNames, Function> modelLoader) { List answer = new ArrayList<>(); @@ -589,6 +597,23 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa return camelReleases("camel-quarkus-releases.json"); } +@Override +public Optional findCapabilityRef(String capability) { +Map capabilities = cache("capabilities", runtimeProvider::findCapabilities); + +String ref = capabilities.get(capab
(camel) branch main updated: chore: minor camel-catalog cleanup
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 7fd42b6a3a9 chore: minor camel-catalog cleanup 7fd42b6a3a9 is described below commit 7fd42b6a3a9aef3eea8e6a14606662b86b220be2 Author: Luca Burgazzoli AuthorDate: Tue Mar 12 10:05:22 2024 +0100 chore: minor camel-catalog cleanup --- .../apache/camel/catalog/DefaultCamelCatalog.java | 61 ++--- .../camel/catalog/DefaultRuntimeProvider.java | 76 +++--- 2 files changed, 49 insertions(+), 88 deletions(-) diff --git a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index adc5e84aa8e..aca19fb66e7 100644 --- a/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/catalog/camel-catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -59,17 +59,35 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa private static final String SCHEMAS_XML = "org/apache/camel/catalog/schemas"; private static final String MAIN_DIR = "org/apache/camel/catalog/main"; private static final String BASE_RESOURCE_DIR = "org/apache/camel/catalog"; + public static final String FIND_COMPONENT_NAMES = "findComponentNames"; +public static final String FIND_COMPONENT_LABELS = "findComponentLabels"; public static final String LIST_COMPONENTS_AS_JSON = "listComponentsAsJson"; + public static final String FIND_DATA_FORMAT_NAMES = "findDataFormatNames"; +public static final String FIND_DATA_FORMAT_LABELS = "findDataFormatLabels"; public static final String LIST_DATA_FORMATS_AS_JSON = "listDataFormatsAsJson"; + public static final String FIND_LANGUAGE_NAMES = "findLanguageNames"; -public static final String FIND_TRANSFORMER_NAMES = "findTransformerNames"; -public static final String FIND_CONSOLE_NAMES = "findConsoleNames"; +public static final String FIND_LANGUAGE_LABELS = "findLanguageLabels"; public static final String LIST_LANGUAGES_AS_JSON = "listLanguagesAsJson"; + +public static final String FIND_TRANSFORMER_NAMES = "findTransformerNames"; public static final String LIST_TRANSFORMERS_AS_JSON = "listTransformersAsJson"; + +public static final String FIND_CONSOLE_NAMES = "findConsoleNames"; public static final String LIST_CONSOLES_AS_JSON = "listConsolesAsJson"; +public static final String FIND_MODEL_NAMES = "findModelNames"; +public static final String FIND_MODEL_LABELS = "findModelLabels"; +public static final String LIST_MODELS_AS_JSON = "listModelsAsJson"; + +public static final String FIND_OTHER_NAMES = "findOtherNames"; +public static final String FIND_OTHER_LABELS = "findOtherLabels"; +public static final String LIST_OTHERS_AS_JSON = "listOthersAsJson"; + +public static final String SUMMARY_AS_JSON = "summaryAsJson"; + private final VersionHelper version = new VersionHelper(); // 3rd party components/data-formats @@ -113,13 +131,9 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa this.runtimeProvider = runtimeProvider; // inject CamelCatalog to the provider this.runtimeProvider.setCamelCatalog(this); + // invalidate the cache -cache.remove(FIND_COMPONENT_NAMES); -cache.remove(LIST_COMPONENTS_AS_JSON); -cache.remove(FIND_DATA_FORMAT_NAMES); -cache.remove(LIST_DATA_FORMATS_AS_JSON); -cache.remove(FIND_LANGUAGE_NAMES); -cache.remove(LIST_LANGUAGES_AS_JSON); +cache.clear(); } @Override @@ -147,8 +161,10 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa extraComponents.put(name, className); // invalidate the cache cache.remove(FIND_COMPONENT_NAMES); -cache.remove("findComponentLabels"); +cache.remove(FIND_COMPONENT_LABELS); cache.remove(LIST_COMPONENTS_AS_JSON); + +cache.remove(SUMMARY_AS_JSON); } @Override @@ -164,8 +180,10 @@ public class DefaultCamelCatalog extends AbstractCamelCatalog implements CamelCa extraDataFormats.put(name, className); // invalidate the cache cache.remove(FIND_DATA_FORMAT_NAMES); -cache.remove("findDataFormatLabels"); +cache.remove(FIND_DATA_FORMAT_LABELS); cache.remove(LIST_DATA_FORMATS_AS_JSON); + +cache.rem
(camel) branch main updated: CAMEL-16557: add a free form key value map on components, dataformats, languages, etc
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 db232c5af0e CAMEL-16557: add a free form key value map on components, dataformats, languages, etc db232c5af0e is described below commit db232c5af0e48b876c92caa1f7ad720daf1ec62d Author: Luca Burgazzoli AuthorDate: Fri Mar 8 18:08:27 2024 +0100 CAMEL-16557: add a free form key value map on components, dataformats, languages, etc --- .../catalog/components/atmosphere-websocket.json | 1 + .../org/apache/camel/catalog/components/cxf.json | 1 + .../org/apache/camel/catalog/components/cxfrs.json | 1 + .../org/apache/camel/catalog/components/grpc.json | 1 + .../org/apache/camel/catalog/components/http.json | 1 + .../org/apache/camel/catalog/components/https.json | 1 + .../org/apache/camel/catalog/components/jetty.json | 1 + .../apache/camel/catalog/components/knative.json | 1 + .../camel/catalog/components/netty-http.json | 1 + .../camel/catalog/components/platform-http.json| 1 + .../org/apache/camel/catalog/components/rest.json | 1 + .../apache/camel/catalog/components/servlet.json | 1 + .../apache/camel/catalog/components/spring-ws.json | 1 + .../apache/camel/catalog/components/webhook.json | 1 + .../apache/camel/catalog/others/groovy-dsl.json| 1 + .../apache/camel/catalog/others/java-joor-dsl.json | 1 + .../org/apache/camel/catalog/others/js-dsl.json| 1 + .../org/apache/camel/catalog/others/jsh-dsl.json | 1 + .../apache/camel/catalog/others/kotlin-dsl.json| 1 + .../apache/camel/catalog/others/xml-io-dsl.json| 1 + .../org/apache/camel/catalog/others/yaml-dsl.json | 1 + .../atmosphere/websocket/atmosphere-websocket.json | 1 + .../atmosphere/websocket/WebsocketEndpoint.java| 5 +- .../apache/camel/component/cxf/jaxrs/cxfrs.json| 1 + .../camel/component/cxf/jaxrs/CxfRsEndpoint.java | 4 ++ .../org/apache/camel/component/cxf/jaxws/cxf.json | 1 + .../camel/component/cxf/jaxws/CxfEndpoint.java | 4 ++ .../org/apache/camel/component/grpc/grpc.json | 1 + .../apache/camel/component/grpc/GrpcEndpoint.java | 4 ++ .../org/apache/camel/component/http/http.json | 1 + .../org/apache/camel/component/http/https.json | 1 + .../apache/camel/component/http/HttpEndpoint.java | 4 +- .../org/apache/camel/component/jetty12/jetty.json | 1 + .../component/jetty12/JettyHttpEndpoint12.java | 5 +- .../jsonvalidator/JsonValidatorEndpoint.java | 7 ++- .../apache/camel/component/knative/knative.json| 1 + .../camel/component/knative/KnativeEndpoint.java | 4 ++ .../camel/component/netty/http/netty-http.json | 1 + .../component/netty/http/NettyHttpEndpoint.java| 5 +- .../component/platform/http/platform-http.json | 1 + .../platform/http/PlatformHttpEndpoint.java| 3 ++ .../org/apache/camel/component/rest/rest.json | 1 + .../apache/camel/component/rest/RestEndpoint.java | 3 ++ .../apache/camel/component/servlet/servlet.json| 1 + .../camel/component/servlet/ServletEndpoint.java | 4 +- .../camel/component/spring/ws/spring-ws.json | 1 + .../spring/ws/SpringWebserviceEndpoint.java| 4 ++ .../apache/camel/component/webhook/webhook.json| 1 + .../camel/component/webhook/WebhookEndpoint.java | 4 ++ .../java/org/apache/camel/spi/Metadata.java| 5 ++ .../src/generated/resources/metadata.json | 14 + dsl/camel-groovy-dsl/camel-groovy-dsl/pom.xml | 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/groovy-dsl.json| 1 + dsl/camel-java-joor-dsl/pom.xml| 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/java-joor-dsl.json | 1 + dsl/camel-js-dsl/pom.xml | 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/js-dsl.json| 1 + dsl/camel-jsh-dsl/pom.xml | 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/jsh-dsl.json | 1 + dsl/camel-kotlin-dsl/pom.xml | 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/kotlin-dsl.json| 1 + dsl/camel-xml-io-dsl/pom.xml | 3 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/xml-io-dsl.json| 1 + dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml | 4 ++ .../services/org/apache/camel/other.properties | 1 + .../src/generated/resources/yaml-dsl.json | 1 + .../maven/packaging/AbstractGeneratorMojo.java | 7 +++ .../packaging/EndpointSchemaGeneratorMojo.java | 4
(camel) branch main updated: Invoke CamelContextCustomizer as part of DefaultConfigurationConfigurer::afterConfigure
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 55904f97568 Invoke CamelContextCustomizer as part of DefaultConfigurationConfigurer::afterConfigure 55904f97568 is described below commit 55904f975689ee3b1694da59c4374826c8b22511 Author: Luca Burgazzoli AuthorDate: Mon Mar 4 12:18:38 2024 +0100 Invoke CamelContextCustomizer as part of DefaultConfigurationConfigurer::afterConfigure --- .../camel/main/DefaultConfigurationConfigurer.java | 10 + .../org/apache/camel/main/MainCustomizerTest.java | 24 ++ 2 files changed, 34 insertions(+) diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java index c727f84f64b..7d62a5f7170 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java @@ -16,6 +16,7 @@ */ package org.apache.camel.main; +import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -46,6 +47,7 @@ import org.apache.camel.model.ModelLifecycleStrategy; import org.apache.camel.spi.AsyncProcessorAwaitManager; import org.apache.camel.spi.BacklogDebugger; import org.apache.camel.spi.BeanIntrospection; +import org.apache.camel.spi.CamelContextCustomizer; import org.apache.camel.spi.ClassResolver; import org.apache.camel.spi.CliConnectorFactory; import org.apache.camel.spi.CompileStrategy; @@ -605,6 +607,14 @@ public final class DefaultConfigurationConfigurer { vault.setHashicorpVaultConfiguration(hashicorp); } configureVault(camelContext); + +// apply custom configurations if any +Set customizers = registry.findByType(CamelContextCustomizer.class); +if (!customizers.isEmpty()) { +customizers.stream() + .sorted(Comparator.comparing(CamelContextCustomizer::getOrder)) +.forEach(c -> c.configure(camelContext)); +} } /** diff --git a/core/camel-main/src/test/java/org/apache/camel/main/MainCustomizerTest.java b/core/camel-main/src/test/java/org/apache/camel/main/MainCustomizerTest.java index f0769331d75..917f9c6f7de 100644 --- a/core/camel-main/src/test/java/org/apache/camel/main/MainCustomizerTest.java +++ b/core/camel-main/src/test/java/org/apache/camel/main/MainCustomizerTest.java @@ -18,12 +18,15 @@ package org.apache.camel.main; import org.apache.camel.BindToRegistry; import org.apache.camel.CamelConfiguration; +import org.apache.camel.CamelContext; import org.apache.camel.component.log.LogComponent; +import org.apache.camel.spi.CamelContextCustomizer; import org.apache.camel.spi.ComponentCustomizer; import org.apache.camel.support.CustomizersSupport; import org.apache.camel.support.processor.DefaultExchangeFormatter; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -76,6 +79,27 @@ public class MainCustomizerTest { } } +@Test +public void testContextCustomizer() { +Main main = new Main(); + +try { +main.configure().addConfiguration(MyConfiguration.class); +main.bind("name-customizer", new CamelContextCustomizer() { +@Override +public void configure(CamelContext camelContext) { + camelContext.getCamelContextExtension().setName("customized-name"); +} +}); + +main.start(); + +assertEquals("customized-name", main.getCamelContext().getName()); +} finally { +main.stop(); +} +} + // // // Helpers
(camel) branch main updated: Regen
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 5f5f9201cfb Regen 5f5f9201cfb is described below commit 5f5f9201cfb09e0caed45b7e7420d3e99f44a72c Author: Luca Burgazzoli AuthorDate: Fri Feb 16 16:50:32 2024 +0100 Regen --- .../kinesis/transform/KinesisCloudEventDataTypeTransformer.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/transform/KinesisCloudEventDataTypeTransformer.java b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/transform/KinesisCloudEventDataTypeTransformer.java index 4d237b2a38e..d85b36cf119 100644 --- a/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/transform/KinesisCloudEventDataTypeTransformer.java +++ b/components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/transform/KinesisCloudEventDataTypeTransformer.java @@ -17,6 +17,8 @@ package org.apache.camel.component.aws2.kinesis.transform; +import java.util.Map; + import org.apache.camel.Message; import org.apache.camel.component.aws2.kinesis.Kinesis2Constants; import org.apache.camel.component.cloudevents.CloudEvent; @@ -25,11 +27,9 @@ import org.apache.camel.spi.DataType; import org.apache.camel.spi.DataTypeTransformer; import org.apache.camel.spi.Transformer; -import java.util.Map; - /** - * Data type transformer converts AWS Kinesis get records response to CloudEvent v1_0 data format. The data type sets Camel - * specific CloudEvent headers with values extracted from AWS Kinesis get object response. + * Data type transformer converts AWS Kinesis get records response to CloudEvent v1_0 data format. The data type sets + * Camel specific CloudEvent headers with values extracted from AWS Kinesis get object response. */ @DataTypeTransformer(name = "aws2-kinesis:application-cloudevents", description = "Adds CloudEvent headers to the Camel message with AWS Kinesis get records response details")
(camel) branch main updated: Regen
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 5564f145036 Regen 5564f145036 is described below commit 5564f1450363993c05ae3f9be5492270041549e7 Author: Luca Burgazzoli AuthorDate: Thu Feb 15 14:57:16 2024 +0100 Regen --- .../CloudtrailCloudEventDataTypeTransformer.java | 2 +- .../aws2/ddb/transform/Ddb2JsonDataTypeTransformer.java | 2 +- .../transform/AWS2S3CloudEventDataTypeTransformer.java | 2 +- .../transform/AWS2SQSCloudEventDataTypeTransformer.java | 2 +- .../AzureStorageBlobCloudEventDataTypeTransformer.java | 2 +- .../AzureStorageQueueCloudEventDataTypeTransformer.java | 2 +- .../transformer/CloudEventHttpDataTypeTransformer.java | 2 +- .../transformer/CloudEventJsonDataTypeTransformer.java | 2 +- .../GoogleSheetsJsonStructDataTypeTransformer.java | 6 +++--- .../GoogleStorageCloudEventDataTypeTransformer.java | 2 +- .../avro/transform/AvroBinaryDataTypeTransformer.java| 2 +- .../avro/transform/AvroPojoDataTypeTransformer.java | 2 +- .../avro/transform/AvroStructDataTypeTransformer.java| 2 +- .../transform/ProtobufBinaryDataTypeTransformer.java | 2 +- .../transform/ProtobufPojoDataTypeTransformer.java | 2 +- .../transform/ProtobufStructDataTypeTransformer.java | 2 +- .../jackson/transform/JsonDataTypeTransformer.java | 2 +- .../jackson/transform/JsonPojoDataTypeTransformer.java | 2 +- .../jackson/transform/JsonStructDataTypeTransformer.java | 2 +- .../builder/endpoint/dsl/STS2EndpointBuilderFactory.java | 16 20 files changed, 37 insertions(+), 21 deletions(-) diff --git a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformer.java b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformer.java index 1e943f0251f..abc86e22363 100644 --- a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformer.java +++ b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/transform/CloudtrailCloudEventDataTypeTransformer.java @@ -32,7 +32,7 @@ import org.apache.camel.spi.Transformer; * sets Camel specific CloudEvent headers with values extracted from AWS Cloudtrail lookup events response. */ @DataTypeTransformer(name = "aws-cloudtrail:application-cloudevents", -description = "Adds CloudEvent headers to the Camel message with AWS Cloudtrail lookup events response details") + description = "Adds CloudEvent headers to the Camel message with AWS Cloudtrail lookup events response details") public class CloudtrailCloudEventDataTypeTransformer extends Transformer { @Override diff --git a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/transform/Ddb2JsonDataTypeTransformer.java b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/transform/Ddb2JsonDataTypeTransformer.java index 90167c3519c..9b1b78d9a9d 100644 --- a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/transform/Ddb2JsonDataTypeTransformer.java +++ b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/transform/Ddb2JsonDataTypeTransformer.java @@ -79,7 +79,7 @@ import software.amazon.awssdk.services.dynamodb.model.ReturnValue; * transformer will map the whole Json body as is then and use it as source for the attribute value map. */ @DataTypeTransformer(name = "aws2-ddb:application-json", -description = "Prepares the message to perform a DynamoDB operation with the aws2-ddb component") + description = "Prepares the message to perform a DynamoDB operation with the aws2-ddb component") public class Ddb2JsonDataTypeTransformer extends Transformer { private final JacksonDataFormat dataFormat = new JacksonDataFormat(Json.mapper(), JsonNode.class); diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/transform/AWS2S3CloudEventDataTypeTransformer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/transform/AWS2S3CloudEventDataTypeTransformer.java index eea4f345a45..6d8d632df94 100644 --- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/transform/AWS2S3CloudEventDataTypeTransformer.java +++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/transform/AWS2S
(camel) branch main updated: CAMEL-20400: Support for Knative SinkBinding
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 2809422a922 CAMEL-20400: Support for Knative SinkBinding 2809422a922 is described below commit 2809422a92234c0daa97f2f745cc8bc2bbf31947 Author: Luca Burgazzoli AuthorDate: Fri Feb 9 14:23:27 2024 +0100 CAMEL-20400: Support for Knative SinkBinding --- .../apache/camel/catalog/components/knative.json | 44 +++ .../knative/spi/KnativeSinkBindingConfigurer.java | 67 +++ camel.component.knative.spi.KnativeSinkBinding | 2 + .../component/knative/spi/KnativeResource.java | 2 +- .../component/knative/spi/KnativeSinkBinding.java | 69 +++ .../component/knative/spi/KnativeSupport.java | 40 --- .../camel-knative/camel-knative-component/pom.xml | 5 + .../knative/KnativeComponentConfigurer.java| 18 +++ .../knative/KnativeEndpointConfigurer.java | 6 + .../knative/KnativeEndpointUriFactory.java | 3 +- .../apache/camel/component/knative/knative.json| 44 +++ .../camel/component/knative/KnativeComponent.java | 23 +++- .../component/knative/KnativeConfiguration.java| 20 +++- .../camel/component/knative/KnativeProducer.java | 64 +- .../camel/component/knative/KnativeSupport.java| 70 +++ .../component/knative/KnativeSinkBindingTest.java | 130 + .../knative/http/KnativeHttpConsumer.java | 4 +- .../dsl/KnativeComponentBuilderFactory.java| 55 + .../dsl/KnativeEndpointBuilderFactory.java | 93 +++ 19 files changed, 665 insertions(+), 94 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/knative.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/knative.json index 54d3bb7fe8a..a3a541e2318 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/knative.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/knative.json @@ -32,16 +32,19 @@ "environmentPath": { "index": 6, "kind": "property", "displayName": "Environment Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The path ot the environment definition" }, "filters": { "index": 7, "kind": "property", "displayName": "Filters", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map", "prefix": "filter.", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the filters." }, "producerFactory": { "index": 8, "kind": "property", "displayName": "Producer Factory", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.knative.spi.KnativeProducerFactory", "deprecated": false, "autowired": false, "secret": false, "description": "The protocol producer factory." }, -"transportOptions": { "index": 9, "kind": "property", "displayName": "Transport Options", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map", "prefix": "transport.", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.knative.KnativeConfiguration", "configurationField": "configuration", "description": "Set the transport options." }, -"typeId": { "index": 10, "kind": "property", "displayName": "Type Id", "group": "common", "label": "", "required": false, "type": &q
[camel] branch yaml-schema-improvements deleted (was 1a75cb18944)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git was 1a75cb18944 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[camel] branch yaml-schema-improvements updated (0481825bd40 -> 1a75cb18944)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit 0481825bd40 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema new 1a75cb18944 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema 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 (0481825bd40) \ N -- N -- N refs/heads/yaml-schema-improvements (1a75cb18944) 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 1 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: .../dsl/yaml/deserializers/ModelDeserializers.java | 308 +-- .../dsl/yaml/GenerateYamlDeserializersMojo.java| 15 +- .../generated/resources/schema/camel-yaml-dsl.json | 608 +++-- .../generated/resources/schema/camelYamlDsl.json | 608 +++-- 4 files changed, 1075 insertions(+), 464 deletions(-)
[camel] branch yaml-schema-improvements updated (38c09be63bf -> 0481825bd40)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit 38c09be63bf [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema new 0481825bd40 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema 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 (38c09be63bf) \ N -- N -- N refs/heads/yaml-schema-improvements (0481825bd40) 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 1 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: .../maven/dsl/yaml/GenerateYamlSchemaMojo.java | 4 +- .../generated/resources/schema/camel-yaml-dsl.json | 191 - .../generated/resources/schema/camelYamlDsl.json | 191 - 3 files changed, 3 insertions(+), 383 deletions(-)
[camel] branch yaml-schema-improvements updated (c8204305a15 -> 38c09be63bf)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit c8204305a15 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema add 38c09be63bf [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema 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 (c8204305a15) \ N -- N -- N refs/heads/yaml-schema-improvements (38c09be63bf) 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. No new revisions were added by this update. Summary of changes: .../maven/dsl/yaml/GenerateYamlSchemaMojo.java | 84 +- .../generated/resources/schema/camel-yaml-dsl.json | 4630 ++-- .../generated/resources/schema/camelYamlDsl.json | 4630 ++-- 3 files changed, 4673 insertions(+), 4671 deletions(-)
[camel] branch yaml-schema-improvements updated (ae29da030b5 -> c8204305a15)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit ae29da030b5 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema add ace3135b35f camel-quartz - Fix flaky test (#11016) add 0c6083b5506 camel-zookeeper-master - Do not create new CamelContext but use injected context in test. (#11017) add 056aef2b062 CAMEL-19498: camel-core - Pool for non-singleton polling consumer should be limite to capacity size, to avoid growing unlimited and leak memory. (#11013) new c8204305a15 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema 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 (ae29da030b5) \ N -- N -- N refs/heads/yaml-schema-improvements (c8204305a15) 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 1 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: .../quartz/CronScheduledRoutePolicyTest.java | 12 +- .../zookeepermaster/MasterEndpointIT.java | 4 +- .../apache/camel/support/cache/ServicePool.java| 15 +- .../maven/dsl/yaml/GenerateYamlSchemaMojo.java | 11 +- .../generated/resources/schema/camel-yaml-dsl.json | 422 ++--- .../generated/resources/schema/camelYamlDsl.json | 422 ++--- 6 files changed, 445 insertions(+), 441 deletions(-)
[camel] branch yaml-schema-improvements updated (430660db5a1 -> ae29da030b5)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit 430660db5a1 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema add eba6928ef64 CAMEL-19702: camel-jbang - Fix version list from/to version with just single digit. add b9d2670ceba CAMEL-19701: camel-main - Filter out k8s injected service ENV variables that can cause camel-main to fail startup. (#10971) add b680698fcee (chores) camel-xmpp: fix most of the test log output to stdout (#10975) add a772a4e9eb0 (chores) camel-xmpp: disable unsupported tests on Github (#10978) add 69ae07723d4 CAMEL-19547: fixed Thread.sleep in camel-xmpp tests (#10977) add 85197d3afa8 Upgrade Google Cloud libraries-bom to 26.21.0 add 1764064684f (chores) camel-couchdb: fix test log output to stdout (#10983) add aab0079a815 (chores) camel-dhis2: fix test log output to stdout (#10984) add 6bf482d1be5 (chores) camel-google-pubsub: fix test log output to stdout (#10985) add e8be6bc0094 (chores) camel-hdfs: fix test log output to stdout (#10986) add 7e8948d823a Export (#10980) add 30b4288d8fd CAMEL-19691: camel-kafka - Allow sslKeystorePassword to be blank. (#10973) add e4a15fa414f exception in onCompletionProcessor should be suppressed, other than be lost (#10944) add fa9c87b620c Regen add 2cf92c29193 Run gav (#10991) add 06d377889c0 Upgrade spring rabbit 3.0.7 add cc5a910ba42 Upgrade redisson 3.23.2 add 95f9d15b57e Upgrade cq-alias-fastinstall-quickly-extension 4.4.2 add bf8b0196f43 Upgrade jgroups 5.2.17 add 99c345a8ca7 Upgrade splunk 1.9.5 add 8407396e755 Upgrade ognl 3.4.1 add 1e420c36dec Upgrade zeebe 8.2.11 add 3e3a2548ae8 Upgrade twilio 9.9.1 add 362a72999d5 Upgrade huawei 3.1.52 add ebe34930362 Upgrade as2 5.1.1 add ef06c356ff9 Upgrade zendesk 0.23.0 add 2897d97d824 Upgrade fastjson 2.0.38 add 212cb209ea7 Upgrade swift prowide SRU2022-10.0.2 add 6a31c1ecbb7 Upgrade bouncycastle 1.76 add 814ac5bdcf7 (chores) ci: remove the checkstyle stage (#10982) add 7f999c187e3 CAMEL-19225: camel-jpa - Refactor JpaComponent (#10992) add 68e642e2e89 Upgrade optaplanner 9.42.0 add a80bed3a361 Upgrade debezium 2.3.2 add 52b64d148e1 Upgrade littleproxy 2.0.19 add 1628580c7b6 Upgrade libphonenumber 8.13.18 add 7877e472332 Upgrade jsch 0.2.11 add cadbf20c136 Upgrade couchbase 3.4.9 add de2fceec839 Upgrade some jira stuff add 86acd9c4a44 AWS upgrade (Enjoy PTO Andrea) (#10993) add 2f95e642dee Upgrade xing 3.5.2 add 4f4d7334fc8 Upgrade to Azure 1.2.15 (#10994) add 0bb4c10a000 Upgrade guava 32.1.2-jre add 59600748052 [CAMEL-19637] Update to Maven 3.9.4 and Maven Resolver 1.9.14 add c39eb5f27ee Upgrade grpc 1.57.1 (#10995) add a2613f53c17 Upgrade commons-lang 3.13.0 (#10996) add 6d16eba85f3 Upgrade google cloud functions/secrets-manager (#10997) add 0944d4958ab Upgrade elasticsearch 8.9.0 (#10998) add d8ce4b54131 camel-jbang - Fix some npes in catalog commands add 0f93f36d2ad bump zookeeper version to 3.9.0 add ee22b2083c4 (chores) camel-componentdsl: fix test log output to stdout (#10999) add 52c7e001484 (chores) camel-endpointdsl: fix test log output to stdout (#11001) add 4b5ea2bb436 (chores) camel-quickfix: fix test log output to stdout (#11002) add 609111d989e (chores) camel-nats: fix test log output to stdout (#11004) add 33cb1036052 (chores) camel-mail: fix test log output to stdout (#11005) add 4944b795ee2 CAMEL-19462 provide session when resolving artifacts (#11003) add a9ce6f6d71e (chores) camel-nats: disable flaky test on GH actions (#11007) add bd56e7dc203 camel-jbang - Upgrade to hawtio 2.17.6 add 1fb17b7b26c CAMEL-19689: camel-jbang - Load classpath resources that have src/main/resources as prefix. add e6f054cc09c CAMEL-19690: camel-salesforce: Fix DTO generation add 52143bd62a1 add salesforce section to 4.0 migration guide. add 94c7bc512d1 Upgrade azure test container add 5b28fe4128f camel-ftp: Fix test due to jsch upgrade add cdee611c578 CAMEL-19714: camel-jsonpath - Need to have json-smart as dependency for predicates to work. (#11008) add 6d0b4e63da4 (chores) camel-xml-io-util: use isEmpty (#11009) add c105bbdb831 camel-jbang - Fix trace compact=false add d9335bc022f (chores) camel-jcr: try reusing forks to reduce test duration (#11010) add 95ed2010c97 CAMEL-19708: camel-jbang - Export Main should support YAML resource fragments for kubernetes support add 6f213c576a2 CAMEL-19708: camel-jbang - Export Main should support YAML resource fragments for kubernetes support add e2a67a898b9 (chores) camel-jcr: avoid recreating
[camel] branch yaml-schema-improvements updated (1214d9664ef -> 430660db5a1)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git omit 1214d9664ef [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema add 430660db5a1 [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema 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 (1214d9664ef) \ N -- N -- N refs/heads/yaml-schema-improvements (430660db5a1) 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. No new revisions were added by this update. Summary of changes: .../main/java/org/apache/camel/spi/annotations/YamlProperty.java| 4 .../src/main/java/org/apache/camel/spi/annotations/YamlType.java| 6 ++ 2 files changed, 10 insertions(+)
[camel] branch yaml-schema-improvements created (now 1214d9664ef)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch yaml-schema-improvements in repository https://gitbox.apache.org/repos/asf/camel.git at 1214d9664ef [CAMEL-19709] yaml dsl: include additional information such as description and title in the jscon schema No new revisions were added by this update.
[camel-quarkus] 01/04: chore: fix various build/compilation warnings
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git commit ba516f923563f1a5420fa46d0774efaefd756264 Author: Luca Burgazzoli AuthorDate: Fri Jun 16 19:23:46 2023 +0200 chore: fix various build/compilation warnings --- .../quarkus/core/deployment/ConsumeProcessor.java | 2 +- .../core/deployment/InjectionPointsProcessor.java | 1 + .../camel/quarkus/core/CamelContextRecorder.java | 12 - .../apache/camel/quarkus/core/CamelRecorder.java | 3 ++- .../camel/quarkus/main/CamelMainRecorder.java | 4 +-- .../main/resources/META-INF/quarkus-extension.yaml | 3 +-- .../freemarker/CamelFreemarkerRecorder.java| 2 +- .../groovy/deployment/GroovyProcessor.java | 11 ++-- .../component/joor/deployment/JoorProcessor.java | 31 +- .../quarkus/component/jq/CamelJqRecorder.java | 2 +- .../dsl/js/deployment/JavaScriptDslProcessor.java | 7 - .../kubernetes/CamelKubernetesRecorder.java| 2 +- .../main/resources/META-INF/quarkus-extension.yaml | 3 +-- .../apache/camel/component/qute/QuteEndpoint.java | 1 + .../quarkus/component/qute/CamelQuteRecorder.java | 2 +- .../component/slack/graal/SlackSubstitutions.java | 2 +- .../camel/quarkus/component/tika/TikaRecorder.java | 2 +- .../component/aws2/s3/it/Aws2S3Resource.java | 26 ++ .../storage/blob/it/AzureStorageBlobResource.java | 8 +++--- .../soap/converter/it/CxfSoapConverterRoutes.java | 1 + .../cxf/soap/mtom/it/CxfSoapMtomRoutes.java| 15 --- .../quarkus/component/bean/eip/EipResource.java| 4 +-- .../quarkus/component/bean/BeanInjectMockTest.java | 2 +- .../apache/camel/quarkus/core/CoreResource.java| 6 ++--- .../camel/quarkus/core/MySerializationObject.java | 16 +-- .../quarkus/core/converter/it/TestConverters.java | 4 +-- .../quarkus/component/mongodb/it/MongoDbTest.java | 19 ++--- .../component/dsl/modeline/it/DslModelineTest.java | 6 +++-- .../camel/quarkus/test/EnabledIfCondition.java | 5 ++-- .../component/braintree/it/BraintreeResource.java | 2 ++ .../quarkus/component/git/it/GitResource.java | 4 ++- .../google/bigquery/it/GoogleBigqueryTest.java | 5 ++-- .../google/storage/it/GoogleStorageResource.java | 6 ++--- .../hazelcast/it/HazelcastReplicatedmapTest.java | 9 +-- .../quarkus/component/jcache/it/JcacheRoutes.java | 4 +-- .../camel/quarkus/component/jq/it/JqResource.java | 2 +- .../component/kafka/CamelKafkaResource.java| 2 +- .../quarkus/component/kafka/it/CamelKafkaTest.java | 5 ++-- .../component/kudu/it/KuduTestResource.java| 7 ++--- .../quarkus/component/leveldb/it/LeveldbTest.java | 7 +++-- .../quarkus/component/mail/CamelResource.java | 2 +- .../scheme/MessagingComponentSchemeProducer.java | 2 +- .../MicroProfileFaultToleranceHelper.java | 2 +- .../quarkus/component/minio/it/MinioResource.java | 14 +- .../component/opentelemetry/it/GreetingsBean.java | 2 +- .../component/pgevent/it/PgEventTestResource.java | 7 +++-- .../quarkus/component/splunk/it/SplunkTest.java| 4 ++- .../component/sql/it/SqlConfigSourceFactory.java | 4 +-- .../quarkus/component/sql/it/SqlResource.java | 2 +- .../camel/quarkus/component/sql/it/SqlRoutes.java | 8 +++--- .../stringtemplate/it/StringtemplateTest.java | 9 +++ integration-tests/swift/pom.xml| 1 + .../component/velocity/it/VelocityResource.java| 10 +++ pom.xml| 28 ++- .../quarkus/maven/UpdateExtensionDocPageMojo.java | 9 --- 55 files changed, 220 insertions(+), 139 deletions(-) diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/ConsumeProcessor.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/ConsumeProcessor.java index 4e965536f2..ac30516ff4 100644 --- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/ConsumeProcessor.java +++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/ConsumeProcessor.java @@ -119,7 +119,7 @@ public class ConsumeProcessor { static String namedValue(ClassInfo classInfo) { String beanName = null; -final AnnotationInstance named = classInfo.classAnnotation(NAMED_ANNOTATION); +final AnnotationInstance named = classInfo.declaredAnnotation(NAMED_ANNOTATION); if (named != null) { if (named.value() != null) { beanName = named.value().asString(); diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/InjectionPointsProcessor.java b/extensions-core/core/deployment/src/main
[camel-quarkus] 04/04: chore: use systemPropertyVariables instead of systemProperties for maven surefire/failsafe plugin config
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git commit 9eb1b7a4018664076615530183a8593084286f53 Author: Luca Burgazzoli AuthorDate: Tue Jul 4 16:42:13 2023 +0200 chore: use systemPropertyVariables instead of systemProperties for maven surefire/failsafe plugin config --- integration-tests/groovy-dsl/pom.xml | 8 integration-tests/main-command-mode/pom.xml| 8 integration-tests/main-unknown-args-fail/pom.xml | 8 integration-tests/main-unknown-args-ignore/pom.xml | 8 integration-tests/main/pom.xml | 4 ++-- integration-tests/master-file/pom.xml | 8 integration-tests/master-openshift/pom.xml | 8 integration-tests/master/pom.xml | 8 integration-tests/quartz-clustered/pom.xml | 8 pom.xml| 4 ++-- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/integration-tests/groovy-dsl/pom.xml b/integration-tests/groovy-dsl/pom.xml index 2e1d62d904..5e9211a412 100644 --- a/integration-tests/groovy-dsl/pom.xml +++ b/integration-tests/groovy-dsl/pom.xml @@ -201,9 +201,9 @@ - + ${quarkus.runner} - + @@ -231,9 +231,9 @@ integration-test - + ${quarkus.runner} - + diff --git a/integration-tests/main-command-mode/pom.xml b/integration-tests/main-command-mode/pom.xml index 9a8e8a17b0..d4656a143b 100644 --- a/integration-tests/main-command-mode/pom.xml +++ b/integration-tests/main-command-mode/pom.xml @@ -90,9 +90,9 @@ integration-test - + ${quarkus.runner.jar} - + @@ -124,9 +124,9 @@ verify - + ${project.build.directory}/${project.artifactId}-${project.version}-runner - + diff --git a/integration-tests/main-unknown-args-fail/pom.xml b/integration-tests/main-unknown-args-fail/pom.xml index 655a0c19c7..aacbd178fd 100644 --- a/integration-tests/main-unknown-args-fail/pom.xml +++ b/integration-tests/main-unknown-args-fail/pom.xml @@ -90,9 +90,9 @@ integration-test - + ${quarkus.runner.jar} - + @@ -124,9 +124,9 @@ verify - + ${project.build.directory}/${project.artifactId}-${project.version}-runner - + diff --git a/integration-tests/main-unknown-args-ignore/pom.xml b/integration-tests/main-unknown-args-ignore/pom.xml index 732d878cd9..3dbd22ace9 100644 --- a/integration-tests/main-unknown-args-ignore/pom.xml +++ b/integration-tests/main-unknown-args-ignore/pom.xml @@ -90,9 +90,9 @@ integration-test
[camel-quarkus] 02/04: chore: sort maven plugin version properties alphabetically
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git commit fd370098cb55260182fb0503b8705f6ed8b333d5 Author: Luca Burgazzoli AuthorDate: Tue Jul 4 14:35:43 2023 +0200 chore: sort maven plugin version properties alphabetically --- pom.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 2540913ccc..428ac57b10 100644 --- a/pom.xml +++ b/pom.xml @@ -179,17 +179,21 @@ 1.2.3 1.7 4.2 +3.1.0 3.6.0 +3.2.0 3.11.0 3.5.0 +3.1.1 3.0.0-M3 3.1.0 -3.1.1 +3.1.1 3.3.0 3.5.0 3.9.0 3.2.1 3.0.0 + 3.1.0 3.3.1 2.0.0 3.5.0 @@ -198,10 +202,6 @@ ${os-maven-plugin-version} ${protobuf-maven-plugin-version} 1.0.0 -3.2.0 -3.1.1 -3.1.0 - 3.1.0
[camel-quarkus] 03/04: Surefire 3.0.0-M4 passing even if a build step throws an exception #723
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git commit b922dcb3245e62381b1fa87e1df0a6fc6be1 Author: Luca Burgazzoli AuthorDate: Tue Jul 4 16:41:25 2023 +0200 Surefire 3.0.0-M4 passing even if a build step throws an exception #723 --- .github/dependabot.yml | 3 --- pom.xml| 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2200a8aaee..aac6ae0839 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -46,6 +46,3 @@ updates: - dependency-name: "org.apache.camel.maven:*" # To be kept manually in alignment with the enforcer API version used in quarkus-enforcer-rules - dependency-name: "org.apache.maven.plugins:maven-enforcer-plugin" - # https://github.com/apache/camel-quarkus/issues/723 - - dependency-name: "org.apache.maven.plugins:maven-failsafe-plugin" - - dependency-name: "org.apache.maven.plugins:maven-surefire-plugin" diff --git a/pom.xml b/pom.xml index 428ac57b10..0996bedeaf 100644 --- a/pom.xml +++ b/pom.xml @@ -197,8 +197,7 @@ 3.3.1 2.0.0 3.5.0 - -2.22.2 +3.1.2 ${os-maven-plugin-version} ${protobuf-maven-plugin-version} 1.0.0
[camel-quarkus] branch main updated (ec9d2859ce -> 9eb1b7a401)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git from ec9d2859ce Set the official snapshot repositories (#5062) new ba516f9235 chore: fix various build/compilation warnings new fd370098cb chore: sort maven plugin version properties alphabetically new b922dcb32c Surefire 3.0.0-M4 passing even if a build step throws an exception #723 new 9eb1b7a401 chore: use systemPropertyVariables instead of systemProperties for maven surefire/failsafe plugin config The 4 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: .github/dependabot.yml | 3 -- .../quarkus/core/deployment/ConsumeProcessor.java | 2 +- .../core/deployment/InjectionPointsProcessor.java | 1 + .../camel/quarkus/core/CamelContextRecorder.java | 12 +++ .../apache/camel/quarkus/core/CamelRecorder.java | 3 +- .../camel/quarkus/main/CamelMainRecorder.java | 4 +-- .../main/resources/META-INF/quarkus-extension.yaml | 3 +- .../freemarker/CamelFreemarkerRecorder.java| 2 +- .../groovy/deployment/GroovyProcessor.java | 11 +-- .../component/joor/deployment/JoorProcessor.java | 31 ++ .../quarkus/component/jq/CamelJqRecorder.java | 2 +- .../dsl/js/deployment/JavaScriptDslProcessor.java | 7 +++- .../kubernetes/CamelKubernetesRecorder.java| 2 +- .../main/resources/META-INF/quarkus-extension.yaml | 3 +- .../apache/camel/component/qute/QuteEndpoint.java | 1 + .../quarkus/component/qute/CamelQuteRecorder.java | 2 +- .../component/slack/graal/SlackSubstitutions.java | 2 +- .../camel/quarkus/component/tika/TikaRecorder.java | 2 +- .../component/aws2/s3/it/Aws2S3Resource.java | 26 --- .../storage/blob/it/AzureStorageBlobResource.java | 8 ++--- .../soap/converter/it/CxfSoapConverterRoutes.java | 1 + .../cxf/soap/mtom/it/CxfSoapMtomRoutes.java| 15 ++--- .../quarkus/component/bean/eip/EipResource.java| 4 +-- .../quarkus/component/bean/BeanInjectMockTest.java | 2 +- .../apache/camel/quarkus/core/CoreResource.java| 6 ++-- .../camel/quarkus/core/MySerializationObject.java | 16 +- .../quarkus/core/converter/it/TestConverters.java | 4 +-- .../quarkus/component/mongodb/it/MongoDbTest.java | 19 +-- .../component/dsl/modeline/it/DslModelineTest.java | 6 ++-- .../camel/quarkus/test/EnabledIfCondition.java | 5 +-- .../component/braintree/it/BraintreeResource.java | 2 ++ .../quarkus/component/git/it/GitResource.java | 4 ++- .../google/bigquery/it/GoogleBigqueryTest.java | 5 +-- .../google/storage/it/GoogleStorageResource.java | 6 ++-- integration-tests/groovy-dsl/pom.xml | 8 ++--- .../hazelcast/it/HazelcastReplicatedmapTest.java | 9 -- .../quarkus/component/jcache/it/JcacheRoutes.java | 4 +-- .../camel/quarkus/component/jq/it/JqResource.java | 2 +- .../component/kafka/CamelKafkaResource.java| 2 +- .../quarkus/component/kafka/it/CamelKafkaTest.java | 5 ++- .../component/kudu/it/KuduTestResource.java| 7 ++-- .../quarkus/component/leveldb/it/LeveldbTest.java | 7 ++-- .../quarkus/component/mail/CamelResource.java | 2 +- integration-tests/main-command-mode/pom.xml| 8 ++--- integration-tests/main-unknown-args-fail/pom.xml | 8 ++--- integration-tests/main-unknown-args-ignore/pom.xml | 8 ++--- integration-tests/main/pom.xml | 4 +-- integration-tests/master-file/pom.xml | 8 ++--- integration-tests/master-openshift/pom.xml | 8 ++--- integration-tests/master/pom.xml | 8 ++--- .../scheme/MessagingComponentSchemeProducer.java | 2 +- .../MicroProfileFaultToleranceHelper.java | 2 +- .../quarkus/component/minio/it/MinioResource.java | 14 .../component/opentelemetry/it/GreetingsBean.java | 2 +- .../component/pgevent/it/PgEventTestResource.java | 7 ++-- integration-tests/quartz-clustered/pom.xml | 8 ++--- .../quarkus/component/splunk/it/SplunkTest.java| 4 ++- .../component/sql/it/SqlConfigSourceFactory.java | 4 +-- .../quarkus/component/sql/it/SqlResource.java | 2 +- .../camel/quarkus/component/sql/it/SqlRoutes.java | 8 ++--- .../stringtemplate/it/StringtemplateTest.java | 9 +++--- integration-tests/swift/pom.xml| 1 + .../component/velocity/it/VelocityResource.java| 10 +++--- pom.xml| 37 ++ .../quarkus/maven/UpdateExtensionDocPageMojo.java | 9 +++--- 65 files changed, 258 insertions(+), 181 deletions(-)
[camel-k] 06/08: feat: use eclipse-temurin:11 as runtime base image
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 839773e135d3c705e701cd2b98d5b455bd193f18 Author: Luca Burgazzoli AuthorDate: Mon Jan 23 15:15:02 2023 +0100 feat: use eclipse-temurin:11 as runtime base image --- pkg/util/defaults/defaults.go | 2 +- script/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index f2a39043d..b881b9a96 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -35,7 +35,7 @@ const ( KanikoVersion = "0.17.1" // baseImage -- - baseImage = "docker.io/adoptopenjdk/openjdk11:slim" + baseImage = "docker.io/eclipse-temurin:11" // LocalRepository -- LocalRepository = "/tmp/artifacts/m2" diff --git a/script/Makefile b/script/Makefile index b222fd1f7..c1d067ff4 100644 --- a/script/Makefile +++ b/script/Makefile @@ -31,7 +31,7 @@ CODEGEN_VERSION := v0.25.2 OPERATOR_SDK_VERSION := v1.16.0 KUSTOMIZE_VERSION := v4.5.4 OPM_VERSION := v1.24.0 -BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim +BASE_IMAGE := docker.io/eclipse-temurin:11 LOCAL_REPOSITORY := /tmp/artifacts/m2 IMAGE_NAME ?= docker.io/apache/camel-k
[camel-k] 05/08: chore(test): improve locale e2e tests
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 6ce7c07c429c7a486434f8f9c24612d73183fc61 Author: Luca Burgazzoli AuthorDate: Mon Jan 23 17:43:03 2023 +0100 chore(test): improve locale e2e tests - remove goroutine for build related test as not needed - added waiting group to wait for async tasks completion --- e2e/local/local_build_test.go | 68 ++--- e2e/local/local_inspect_test.go | 20 +++- e2e/local/local_run_test.go | 33 +--- e2e/support/util/log_scanner.go | 5 +++ 4 files changed, 55 insertions(+), 71 deletions(-) diff --git a/e2e/local/local_build_test.go b/e2e/local/local_build_test.go index 543f0da2c..de8ba6a32 100644 --- a/e2e/local/local_build_test.go +++ b/e2e/local/local_build_test.go @@ -25,7 +25,6 @@ import ( "fmt" "io" "strings" - "sync" "testing" . "github.com/onsi/gomega" @@ -55,7 +54,7 @@ func getCamelVersion() string { func TestLocalBuild(t *testing.T) { RegisterTestingT(t) - ctx, cancel := context.WithCancel(TestContext) + ctx, cancel := context.WithTimeout(TestContext, TestTimeoutMedium) defer cancel() piper, pipew := io.Pipe() defer pipew.Close() @@ -71,11 +70,7 @@ func TestLocalBuild(t *testing.T) { msgTagged := "Successfully tagged" logScanner := testutil.NewLogScanner(ctx, piper, msgTagged, image) - go func() { - err := kamelBuild.Execute() - assert.NoError(t, err) - cancel() - }() + Expect(kamelBuild.Execute()).To(BeNil()) Eventually(logScanner.IsFound(msgTagged), TestTimeoutMedium).Should(BeTrue()) Eventually(logScanner.IsFound(image), TestTimeoutMedium).Should(BeTrue()) @@ -85,7 +80,7 @@ func TestLocalBuild(t *testing.T) { func TestLocalBuildWithTrait(t *testing.T) { RegisterTestingT(t) - ctx, cancel := context.WithCancel(TestContext) + ctx, cancel := context.WithTimeout(TestContext, TestTimeoutMedium) defer cancel() piper, pipew := io.Pipe() defer pipew.Close() @@ -102,11 +97,7 @@ func TestLocalBuildWithTrait(t *testing.T) { msgTagged := "Successfully tagged" logScanner := testutil.NewLogScanner(ctx, piper, msgWarning, msgTagged, image) - go func() { - err := kamelBuild.Execute() - assert.NoError(t, err) - cancel() - }() + Expect(kamelBuild.Execute()).To(BeNil()) Eventually(logScanner.IsFound(msgWarning), TestTimeoutMedium).Should(BeTrue()) Eventually(logScanner.IsFound(msgTagged), TestTimeoutMedium).Should(BeTrue()) @@ -117,7 +108,7 @@ func TestLocalBuildWithTrait(t *testing.T) { func TestLocalBuildWithInvalidDependency(t *testing.T) { RegisterTestingT(t) - ctx, cancel := context.WithCancel(TestContext) + ctx, cancel := context.WithTimeout(TestContext, TestTimeoutMedium) defer cancel() piper, pipew := io.Pipe() defer pipew.Close() @@ -138,25 +129,17 @@ func TestLocalBuildWithInvalidDependency(t *testing.T) { warn3 := "Warning: do not use mvn:org.apache.camel.quarkus:camel-quarkus-netty:2.11.0. Use camel:netty instead" logScanner := testutil.NewLogScanner(ctx, piper, warn1, warn2, warn3) - var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() - err := kamelBuild.Execute() - assert.Error(t, err) - cancel() - }() + Expect(kamelBuild.Execute()).To(Not(BeNil())) Eventually(logScanner.IsFound(warn1), TestTimeoutShort).Should(BeTrue()) Eventually(logScanner.IsFound(warn2), TestTimeoutShort).Should(BeTrue()) Eventually(logScanner.IsFound(warn3), TestTimeoutShort).Should(BeTrue()) - wg.Wait() } func TestLocalBuildIntegrationDirectory(t *testing.T) { RegisterTestingT(t) - ctx, cancel := context.WithCancel(TestContext) + ctx, cancel := context.WithTimeout(TestContext, TestTimeoutMedium) defer cancel() file := testutil.MakeTempCopy(t, "files/yaml.yaml") @@ -164,10 +147,7 @@ func TestLocalBuildIntegrationDirectory(t *testing.T) { kamelBuild := kamelWithContext(ctx, "local", "build", file, "--integration-directory", dir) - go func() { - err := kamelBuild.Execute() - assert.NoError(t, err) - }() + Expect(kamelBuild.Execute()).To(BeNil()) Eventually(dir+"/dependencies", TestTimeoutShort).Should(BeADirectory()) Eventually(dependency(dir, "org.apache.camel.camel-timer-%s.jar
[camel-k] branch main updated (eddca6be0 -> 30a82e583)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from eddca6be0 chore(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0 new 99b0d040a feat: Render error message condition as json/structured message #3967 new 39abbab67 feat: Render error message condition as json/structured message (applyconfig) #3967 new 935cb3aec chore(test): improve maven log test new c9776e11e chore(test): improve knative kamelet binding test new 6ce7c07c4 chore(test): improve locale e2e tests new 839773e13 feat: use eclipse-temurin:11 as runtime base image new 20ef910da workaround: force eclipse-temurin:11 as runtime base image for upgrade tests new 30a82e583 feat: use eclipse temurin as java distribution for github actions The 8 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: .github/actions/kamel-prepare-env/action.yml | 5 +- .../duck/client/internalclientset/fake/register.go | 14 +- .../client/internalclientset/scheme/register.go| 14 +- .../crd/bases/camel.apache.org_integrations.yaml | 60 ++ .../bases/camel.apache.org_kameletbindings.yaml| 60 ++ docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 123 +++ docs/modules/ROOT/partials/apis/kamelets-crds.adoc | 7 + e2e/global/common/kamelet_binding_test.go | 23 +-- e2e/global/common/traits/health_test.go| 229 +++-- e2e/global/knative/kamelet_test.go | 22 +- e2e/local/local_build_test.go | 68 ++ e2e/local/local_inspect_test.go| 20 +- e2e/local/local_run_test.go| 33 ++- e2e/namespace/upgrade/cli_upgrade_test.go | 4 +- e2e/namespace/upgrade/olm_upgrade_test.go | 1 + e2e/support/test_support.go| 80 ++- e2e/support/util/log_scanner.go| 5 + helm/camel-k/crds/crd-integration.yaml | 60 ++ helm/camel-k/crds/crd-kamelet-binding.yaml | 60 ++ .../v1/addontrait.go => apis/camel/v1/health.go} | 24 +-- pkg/apis/camel/v1/integration_types.go | 8 + pkg/apis/camel/v1/zz_generated.deepcopy.go | 72 +++ pkg/apis/camel/v1alpha1/kamelet_binding_types.go | 2 + pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 7 + .../v1/{s2itask.go => healthcheckresponse.go} | 38 ++-- .../camel/v1/integrationcondition.go | 28 ++- .../applyconfiguration/camel/v1/podcondition.go| 67 ++ .../camel/v1alpha1/kameletbindingcondition.go | 27 ++- pkg/client/camel/applyconfiguration/utils.go | 4 + .../camel/clientset/versioned/fake/register.go | 14 +- .../camel/clientset/versioned/scheme/register.go | 14 +- pkg/controller/integration/health.go | 26 +-- pkg/controller/integration/health_test.go | 27 ++- pkg/controller/integration/monitor.go | 106 -- pkg/controller/kameletbinding/monitor.go | 43 ++-- pkg/resources/resources.go | 8 +- pkg/util/defaults/defaults.go | 2 +- pkg/util/maven/maven_log_test.go | 8 +- script/Makefile| 5 +- script/gen_client.sh | 1 - script/gen_client_strimzi.sh | 1 - 41 files changed, 1144 insertions(+), 276 deletions(-) copy pkg/{client/camel/applyconfiguration/camel/v1/addontrait.go => apis/camel/v1/health.go} (57%) copy pkg/client/camel/applyconfiguration/camel/v1/{s2itask.go => healthcheckresponse.go} (50%) create mode 100644 pkg/client/camel/applyconfiguration/camel/v1/podcondition.go
[camel-k] 04/08: chore(test): improve knative kamelet binding test
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit c9776e11e4371429e8163f52ecab10dc8bab633a Author: Luca Burgazzoli AuthorDate: Thu Jan 19 14:55:03 2023 +0100 chore(test): improve knative kamelet binding test I've removed some expectation as based on timing an likely to randomly fail. --- e2e/global/knative/kamelet_test.go | 22 -- e2e/support/test_support.go| 7 +++ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/e2e/global/knative/kamelet_test.go b/e2e/global/knative/kamelet_test.go index 420a791a4..811149ccb 100644 --- a/e2e/global/knative/kamelet_test.go +++ b/e2e/global/knative/kamelet_test.go @@ -42,6 +42,7 @@ func TestKameletChange(t *testing.T) { WithNewTestNamespace(t, func(ns string) { operatorID := "camel-k-kamelet-change" timerSource := "my-timer-source" + Expect(KamelInstallWithID(operatorID, ns).Execute()).To(Succeed()) Expect(CreateTimerKamelet(ns, timerSource)()).To(Succeed()) Expect(CreateKnativeChannel(ns, "messages")()).To(Succeed()) @@ -66,22 +67,15 @@ func TestKameletChange(t *testing.T) { "trait.camel.apache.org/health.readiness-initial-delay": "10", } + // Create the KameletBinding Expect(BindKameletTo(ns, timerBinding, annotations, from, to, map[string]string{"message": "message is Hello"}, map[string]string{})()).To(Succeed()) - Eventually(KameletBindingConditionStatus(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionFalse)) - Eventually(KameletBindingCondition(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).Should(And( - WithTransform(KameletBindingConditionReason, Equal(v1.IntegrationConditionDeploymentProgressingReason)), - WithTransform(KameletBindingConditionMessage, Or( - Equal("0/1 updated replicas"), - Equal("0/1 ready replicas"), - - Eventually(IntegrationPodPhase(ns, timerBinding), TestTimeoutLong).Should(Equal(corev1.PodRunning)) Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) Eventually(IntegrationLogs(ns, "display"), TestTimeoutShort).Should(ContainSubstring("message is Hello")) - Eventually(KameletBindingConditionStatus(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) Eventually(KameletBindingCondition(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).Should(And( + WithTransform(KameletBindingConditionStatusExtract, Equal(corev1.ConditionTrue)), WithTransform(KameletBindingConditionReason, Equal(v1.IntegrationConditionDeploymentReadyReason)), WithTransform(KameletBindingConditionMessage, Equal(fmt.Sprintf("1/1 ready replicas"))), )) @@ -89,21 +83,13 @@ func TestKameletChange(t *testing.T) { // Update the KameletBinding Expect(BindKameletTo(ns, "timer-binding", annotations, from, to, map[string]string{"message": "message is Hi"}, map[string]string{})()).To(Succeed()) - Eventually(KameletBindingConditionStatus(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionFalse)) - Eventually(KameletBindingCondition(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).Should(And( - WithTransform(KameletBindingConditionReason, Equal(v1.IntegrationConditionDeploymentProgressingReason)), - WithTransform(KameletBindingConditionMessage, Or( - Equal("0/1 updated replicas"), - Equal("0/1 ready replicas"), - - Eventually(IntegrationPodPhase(ns, "timer-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning)) Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) Eventually(IntegrationLogs(ns, "display"), TestTimeoutShort).Should(ContainSubstring("message is Hi")) - Eventually(Ka
[camel-k] 08/08: feat: use eclipse temurin as java distribution for github actions
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 30a82e583a641f7ce8e753046d61e9f2dbc20a78 Author: Luca Burgazzoli AuthorDate: Mon Jan 23 20:48:16 2023 +0100 feat: use eclipse temurin as java distribution for github actions --- .github/actions/kamel-prepare-env/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/kamel-prepare-env/action.yml b/.github/actions/kamel-prepare-env/action.yml index c7788cbd6..d23345a04 100644 --- a/.github/actions/kamel-prepare-env/action.yml +++ b/.github/actions/kamel-prepare-env/action.yml @@ -63,10 +63,11 @@ runs: df -h - name: Set up JDK 11 - uses: AdoptOpenJDK/install-jdk@v1 + uses: actions/setup-java@v3 if: ${{ env.ENV_PREPARED != 'true' }} with: -version: "11" +java-version: '11' +distribution: 'temurin' - name: Set up Go uses: actions/setup-go@v2 # Version 2 adds GOBIN to PATH
[camel-k] 07/08: workaround: force eclipse-temurin:11 as runtime base image for upgrade tests
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 20ef910da6423bfd48fffc9ce51655bed5e67168 Author: Luca Burgazzoli AuthorDate: Mon Jan 23 20:40:47 2023 +0100 workaround: force eclipse-temurin:11 as runtime base image for upgrade tests --- e2e/namespace/upgrade/cli_upgrade_test.go | 4 ++-- e2e/namespace/upgrade/olm_upgrade_test.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/namespace/upgrade/cli_upgrade_test.go b/e2e/namespace/upgrade/cli_upgrade_test.go index 7e9b35d23..e3f155c87 100644 --- a/e2e/namespace/upgrade/cli_upgrade_test.go +++ b/e2e/namespace/upgrade/cli_upgrade_test.go @@ -51,7 +51,7 @@ func TestOperatorUpgrade(t *testing.T) { Expect(os.Setenv("KAMEL_BIN", kamel)).To(Succeed()) // Should both install the CRDs and kamel in the given namespace - Expect(Kamel("install", "-n", ns, "--olm=false", "--force").Execute()).To(Succeed()) + Expect(Kamel("install", "-n", ns, "--olm=false", "--force", "--base-image", defaults.BaseImage()).Execute()).To(Succeed()) // Check the operator pod is running Eventually(OperatorPodPhase(ns), TestTimeoutMedium).Should(Equal(corev1.PodRunning)) @@ -75,7 +75,7 @@ func TestOperatorUpgrade(t *testing.T) { Expect(os.Setenv("KAMEL_BIN", "")).To(Succeed()) // Upgrade the operator by installing the current version - Expect(KamelInstall(ns, "--olm=false", "--force", "--operator-image", image).Execute()).To(Succeed()) + Expect(KamelInstall(ns, "--olm=false", "--force", "--operator-image", image, "--base-image", defaults.BaseImage()).Execute()).To(Succeed()) // Check the operator image is the current built one Eventually(OperatorImage(ns)).Should(Equal(image)) diff --git a/e2e/namespace/upgrade/olm_upgrade_test.go b/e2e/namespace/upgrade/olm_upgrade_test.go index 24d2c33ff..f15d269d9 100644 --- a/e2e/namespace/upgrade/olm_upgrade_test.go +++ b/e2e/namespace/upgrade/olm_upgrade_test.go @@ -90,6 +90,7 @@ func TestOLMAutomaticUpgrade(t *testing.T) { "--olm=true", "--olm-source", catalogSourceName, "--olm-source-namespace", ns, + "--base-image", defaults.BaseImage(), } if prevUpdateChannel != "" {
[camel-k] 03/08: chore(test): improve maven log test
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 935cb3aecd7ecc209101ab25188551e73f3f4350 Author: Luca Burgazzoli AuthorDate: Wed Jan 18 10:25:22 2023 +0100 chore(test): improve maven log test - support for MAVEN_CMD env var as camel-k does - run maven in batch mode to avoid including ASCII escaping chars in the error message which could cause the test to fail in some evironments --- pkg/util/maven/maven_log_test.go | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/util/maven/maven_log_test.go b/pkg/util/maven/maven_log_test.go index 96c1441d4..a9c18ada0 100644 --- a/pkg/util/maven/maven_log_test.go +++ b/pkg/util/maven/maven_log_test.go @@ -19,6 +19,7 @@ package maven import ( "context" + "os" "os/exec" "testing" @@ -27,7 +28,12 @@ import ( ) func TestRunAndLogErrorMvn(t *testing.T) { - cmd := exec.CommandContext(context.Background(), "mvn", "package") + mavenCmd, ok := os.LookupEnv("MAVEN_CMD") + if !ok { + mavenCmd = "mvn" + } + + cmd := exec.CommandContext(context.Background(), mavenCmd, "package", "-B") err := util.RunAndLog(context.Background(), cmd, mavenLogHandler, mavenLogHandler) assert.NotNil(t, err)
[camel-kamelets] 01/02: azure-eventhubs-sink: remove hardcoded jackson dependencies
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch 0.9.x in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git commit 9635b0ea2c58697a97c67b3747fafce2879fcd60 Author: Luca Burgazzoli AuthorDate: Tue Oct 25 09:32:25 2022 +0200 azure-eventhubs-sink: remove hardcoded jackson dependencies --- kamelets/azure-eventhubs-sink.kamelet.yaml | 5 - 1 file changed, 5 deletions(-) diff --git a/kamelets/azure-eventhubs-sink.kamelet.yaml b/kamelets/azure-eventhubs-sink.kamelet.yaml index 415944b9..5088abf8 100644 --- a/kamelets/azure-eventhubs-sink.kamelet.yaml +++ b/kamelets/azure-eventhubs-sink.kamelet.yaml @@ -67,11 +67,6 @@ spec: - urn:camel:group:credentials dependencies: - "camel:core" -#TODO: these mvn:* dependencies must be removed after upgrading to camel 3.10 -- "mvn:com.fasterxml.jackson.core:jackson-core:2.11.3" -- "mvn:com.fasterxml.jackson.core:jackson-annotations:2.11.3" -- "mvn:com.fasterxml.jackson.core:jackson-databind:2.11.3" -- "mvn:com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.3" - "camel:azure-eventhubs" - "camel:kamelet" template:
[camel-kamelets] branch 0.9.x updated (28d7a4e9 -> e5e83f3c)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch 0.9.x in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git from 28d7a4e9 Camel Kamelets 0.9.x is used by Camel K 1.10.2 new 9635b0ea azure-eventhubs-sink: remove hardcoded jackson dependencies new e5e83f3c chore: regen 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: kamelets/avro-deserialize-action.kamelet.yaml | 4 ++-- kamelets/avro-serialize-action.kamelet.yaml| 4 ++-- kamelets/aws-cloudwatch-sink.kamelet.yaml | 2 +- kamelets/aws-ddb-sink.kamelet.yaml | 4 ++-- kamelets/aws-ddb-streams-source.kamelet.yaml | 2 +- kamelets/aws-ec2-sink.kamelet.yaml | 2 +- kamelets/aws-eventbridge-sink.kamelet.yaml | 2 +- kamelets/aws-kinesis-firehose-sink.kamelet.yaml| 2 +- kamelets/aws-kinesis-sink.kamelet.yaml | 2 +- kamelets/aws-kinesis-source.kamelet.yaml | 2 +- kamelets/aws-lambda-sink.kamelet.yaml | 2 +- kamelets/aws-redshift-sink.kamelet.yaml| 2 +- kamelets/aws-redshift-source.kamelet.yaml | 2 +- kamelets/aws-s3-sink.kamelet.yaml | 2 +- kamelets/aws-s3-source.kamelet.yaml| 2 +- kamelets/aws-s3-streaming-upload-sink.kamelet.yaml | 2 +- kamelets/aws-secrets-manager-sink.kamelet.yaml | 2 +- kamelets/aws-ses-sink.kamelet.yaml | 2 +- kamelets/aws-sns-fifo-sink.kamelet.yaml| 2 +- kamelets/aws-sns-sink.kamelet.yaml | 2 +- kamelets/aws-sqs-batch-sink.kamelet.yaml | 2 +- kamelets/aws-sqs-fifo-sink.kamelet.yaml| 2 +- kamelets/aws-sqs-sink.kamelet.yaml | 2 +- kamelets/aws-sqs-source.kamelet.yaml | 2 +- kamelets/aws-translate-action.kamelet.yaml | 2 +- kamelets/azure-cosmosdb-source.kamelet.yaml| 2 +- kamelets/azure-eventhubs-sink.kamelet.yaml | 7 +-- kamelets/azure-eventhubs-source.kamelet.yaml | 2 +- kamelets/azure-functions-sink.kamelet.yaml | 2 +- kamelets/azure-servicebus-sink.kamelet.yaml| 2 +- kamelets/azure-servicebus-source.kamelet.yaml | 2 +- kamelets/azure-storage-blob-changefeed-source.kamelet.yaml | 2 +- kamelets/azure-storage-blob-sink.kamelet.yaml | 2 +- kamelets/azure-storage-blob-source.kamelet.yaml| 2 +- kamelets/azure-storage-queue-sink.kamelet.yaml | 2 +- kamelets/azure-storage-queue-source.kamelet.yaml | 2 +- kamelets/beer-source.kamelet.yaml | 2 +- kamelets/bitcoin-source.kamelet.yaml | 2 +- kamelets/caffeine-action.kamelet.yaml | 2 +- kamelets/cassandra-sink.kamelet.yaml | 2 +- kamelets/cassandra-source.kamelet.yaml | 2 +- kamelets/ceph-sink.kamelet.yaml| 2 +- kamelets/ceph-source.kamelet.yaml | 2 +- kamelets/chuck-norris-source.kamelet.yaml | 2 +- kamelets/chunk-template-action.kamelet.yaml| 2 +- kamelets/couchbase-sink.kamelet.yaml | 2 +- kamelets/cron-source.kamelet.yaml | 2 +- kamelets/delay-action.kamelet.yaml | 2 +- kamelets/dns-dig-action.kamelet.yaml | 2 +- kamelets/dns-ip-action.kamelet.yaml| 2 +- kamelets/dns-lookup-action.kamelet.yaml| 2 +- kamelets/drop-header-action.kamelet.yaml | 2 +- kamelets/drop-headers-action.kamelet.yaml | 2 +- kamelets/dropbox-sink.kamelet.yaml | 2 +- kamelets/dropbox-source.kamelet.yaml | 2 +- kamelets/earthquake-source.kamelet.yaml| 2 +- kamelets/elasticsearch-index-sink.kamelet.yaml | 2 +- kamelets/elasticsearch-search-source.kamelet.yaml |
[camel-spring-boot] branch main updated: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git The following commit(s) were added to refs/heads/main by this push: new 952dcbab608 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 952dcbab608 is described below commit 952dcbab608ff537c7945e31312864d4380a73fa Author: Luca Burgazzoli AuthorDate: Thu Oct 20 14:51:59 2022 +0200 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled --- core/camel-spring-boot/src/main/docs/spring-boot.json | 6 ++ .../actuate/health/CamelHealthCheckAutoConfiguration.java | 11 +++ .../health/CamelHealthCheckConfigurationProperties.java | 15 +++ 3 files changed, 32 insertions(+) diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json b/core/camel-spring-boot/src/main/docs/spring-boot.json index f4f3d3b1ecd..cf9e5d5a340 100644 --- a/core/camel-spring-boot/src/main/docs/spring-boot.json +++ b/core/camel-spring-boot/src/main/docs/spring-boot.json @@ -421,6 +421,12 @@ "sourceType": "org.apache.camel.spring.boot.DataFormatConfigurationProperties", "defaultValue": true }, +{ + "name": "camel.health.components-enabled", + "type": "java.lang.Boolean", + "description": "Whether components health check is enabled. Is default enabled", + "sourceType": "org.apache.camel.spring.boot.actuate.health.CamelHealthCheckConfigurationProperties" +}, { "name": "camel.health.consumers-enabled", "type": "java.lang.Boolean", diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java index 02f2f7085a4..5b982870d20 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java @@ -101,6 +101,17 @@ public class CamelHealthCheckAutoConfiguration { hcr.register(hc); } } +// components are enabled by default +if (hcr.isEnabled()) { +HealthCheckRepository hc += hcr.getRepository("components").orElse((HealthCheckRepository) hcr.resolveById("components")); +if (hc != null) { +if (config.getComponentsEnabled() != null) { +hc.setEnabled(config.getComponentsEnabled()); +} +hcr.register(hc); +} +} // consumers are enabled by default if (hcr.isEnabled()) { HealthCheckRepository hc diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java index 5e8d1eb0ee6..e9ceaa98767 100644 --- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java +++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java @@ -36,6 +36,13 @@ public class CamelHealthCheckConfigurationProperties { */ private Boolean routesEnabled; +/** + * Whether components health check is enabled. + * + * Is default enabled + */ +private Boolean componentsEnabled; + /** * Whether consumers health check is enabled. * @@ -120,6 +127,14 @@ public class CamelHealthCheckConfigurationProperties { this.registryEnabled = registryEnabled; } +public Boolean getComponentsEnabled() { +return componentsEnabled; +} + +public void setComponentsEnabled(Boolean componentsEnabled) { +this.componentsEnabled = componentsEnabled; +} + public String getExcludePattern() { return excludePattern; }
[camel] branch main updated: feat: replace custom aws health check repositories with the components one
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 37b90d302fe feat: replace custom aws health check repositories with the components one 37b90d302fe is described below commit 37b90d302fe3f9ad82e98984ab760f417e415e4d Author: Luca Burgazzoli AuthorDate: Thu Oct 20 15:16:46 2022 +0200 feat: replace custom aws health check repositories with the components one --- .../health-check/camel-aws2-athena-repository | 2 - .../component/aws2/athena/Athena2Endpoint.java | 10 ++- .../aws2/athena/Athena2HealthCheckRepository.java | 87 -- .../camel/health-check/camel-aws2-s3-repository| 2 - .../camel/component/aws2/s3/AWS2S3Consumer.java| 9 ++- .../aws2/s3/AWS2S3HealthCheckRepository.java | 87 -- .../camel/health-check/camel-aws2-sqs-repository | 2 - .../camel/component/aws2/sqs/Sqs2Consumer.java | 10 ++- .../aws2/sqs/Sqs2HealthCheckRepository.java| 87 -- 9 files changed, 20 insertions(+), 276 deletions(-) diff --git a/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/services/org/apache/camel/health-check/camel-aws2-athena-repository b/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/services/org/apache/camel/health-check/camel-aws2-athena-repository deleted file mode 100644 index 4a65fadb0b7..000 --- a/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/services/org/apache/camel/health-check/camel-aws2-athena-repository +++ /dev/null @@ -1,2 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -class=org.apache.camel.component.aws2.athena.Athena2HealthCheckRepository diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java index 9799e0300a0..3932fc05dd8 100644 --- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java +++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java @@ -23,6 +23,7 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.component.aws2.athena.client.Athena2ClientFactory; import org.apache.camel.health.HealthCheckHelper; +import org.apache.camel.health.WritableHealthCheckRepository; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.support.DefaultEndpoint; @@ -38,7 +39,7 @@ public class Athena2Endpoint extends DefaultEndpoint { private AthenaClient athenaClient; -private Athena2HealthCheckRepository healthCheckRepository; +private WritableHealthCheckRepository healthCheckRepository; private Athena2ClientHealthCheck clientHealthCheck; @UriParam @@ -67,8 +68,11 @@ public class Athena2Endpoint extends DefaultEndpoint { ? configuration.getAmazonAthenaClient() : Athena2ClientFactory.getAWSAthenaClient(configuration).getAthenaClient(); -healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(getCamelContext(), -Athena2HealthCheckRepository.REPOSITORY_ID, Athena2HealthCheckRepository.class); +// health-check is optional so discover and resolve +healthCheckRepository = HealthCheckHelper.getHealthCheckRepository( +getCamelContext(), +"components", +WritableHealthCheckRepository.class); if (healthCheckRepository != null) { clientHealthCheck = new Athena2ClientHealthCheck(this, getId()); diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2HealthCheckRepository.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2HealthCheckRepository.java deleted file mode 100644 index 090671edbab..000 --- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2HealthCheckRepository.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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
[camel] branch main updated: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 41e5c11c750 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 41e5c11c750 is described below commit 41e5c11c750302ebfc3d75df43459a2d62d18b35 Author: Luca Burgazzoli AuthorDate: Thu Oct 20 12:11:35 2022 +0200 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled --- .../main/camel-main-configuration-metadata.json| 1 + .../camel/health-check/camel-kafka-repository | 2 - .../camel/component/kafka/KafkaConsumer.java | 10 +- .../camel/component/kafka/KafkaProducer.java | 10 +- .../CamelMicroProfileHealthCheckRegistry.java | 52 ++--- .../CamelMicroProfileHealthComponentsTest.java | 85 ++ ...MicroProfileHealthSupervisedRoutesMainTest.java | 15 ++- .../health/CamelMicroProfileHealthTestHelper.java | 125 + .../health/CamelMicroProfileHealthTestSupport.java | 18 +++ ...thCheckRepository.java => HasHealthChecks.java} | 29 + .../apache/camel/health/HealthCheckRepository.java | 8 +- .../health/WritableHealthCheckRepository.java | 33 ++ .../camel/health-check/components-repository | 2 + .../health/ComponentsHealthCheckRepository.java| 27 +++-- .../HealthConfigurationPropertiesConfigurer.java | 6 + .../camel-main-configuration-metadata.json | 1 + core/camel-main/src/main/docs/main.adoc| 3 +- .../org/apache/camel/main/BaseMainSupport.java | 11 ++ .../camel/main/HealthConfigurationProperties.java | 13 +++ 19 files changed, 376 insertions(+), 75 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json index da0c1336d03..5a9342a6808 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json @@ -143,6 +143,7 @@ { "name": "camel.faulttolerance.timeoutEnabled", "description": "Whether timeout is enabled or not on the circuit breaker. Default is false.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false }, { "name": "camel.faulttolerance.timeoutPoolSize", "description": "Configures the pool size of the thread pool when timeout is enabled. Default value is 10.", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "integer", "javaType": "java.lang.Integer", "defaultValue": 10 }, { "name": "camel.faulttolerance.timeoutScheduledExecutorService", "description": "References to a custom thread pool to use when timeout is enabled", "sourceType": "org.apache.camel.main.FaultToleranceConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, +{ "name": "camel.health.componentsEnabled", "description": "Whether components health check is enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, { "name": "camel.health.consumersEnabled", "description": "Whether consumers health check is enabled", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, { "name": "camel.health.enabled", "description": "Whether health check is enabled globally", "sourceType": "org.apache.camel.main.HealthConfigurationProperties", "type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": true }, { "name": "camel.health.excludePattern", "description": "Pattern to exclude health checks from being invoked by Camel when checking healths. Multiple patterns can be separated by comma.", "sourceType&quo
[camel] branch CAMEL-18617 updated (eead0da651a -> 5f95edd11b8)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git discard eead0da651a CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add 8bdf3833361 CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs add 5b51f3fb85b Upgrade Infinispan to version 14.0.1.Final add d03295b5df9 Sync deps add 444ac0abbb4 Upgrade Infinispan Container Image to version 14.0.1-Final add adb80d86a0c Upgrade AWS SDK v2 to version 2.17.295 add 7e69fcac9a1 Sync deps add 3139a76ca6f CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs add 245c5cf5c18 CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs add 5fcb62dd171 Use latest container image for Hashicorp Vault 1.12.0 in test-infra module add 0cdb1137d7d camel-jbang - Upgrade to quarkus 2.13.3 add fd135f9c81d CAMEL-18622: camel-yaml-dsl - Add support for camel.yaml/camelk.yaml file extension add 3d1082cdbff CAMEL-18622: camel-yaml-dsl - Add support for camel.yaml/camelk.yaml file extension add 1ee5ea63806 Upgrade Spring Security to version 5.7.4 add 88e50254006 Sync deps add 68663ecdaaa Add note about AHC components removed in 3.19 (#8595) add 8210336f774 camel-jbang - Add missing annotation for IoC add d44e014ab58 [CAMEL-18612] Documentation for the new Jsonpath option (#8596) add e8356136483 [CAMEL-18612] Documentation for the new Jsonpath option (#8596) add 5c09cf83978 Platform HTTP Vertx Component: Fixed Camel Website build add a2a99874757 chore(aws-s3): fix deprecation warning (#8597) add 98d3ecc07c0 chore(main): fix warning about accessing MainHelpe static members via instance reference (#8598) add 7ea810010eb camel-jbang - Tone down logging noise add e2fca637f94 Regen for commit 7ea810010ebf2fa727229ac8e5fc06f05c21ab13 (#8599) add 59b48860704 camel-console - Polished add 3c21bc0ddf6 CAMEL-18626: Java DSL to allow property placeholders in setExchangePattern add 5f95edd11b8 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (eead0da651a) \ N -- N -- N refs/heads/CAMEL-18617 (5f95edd11b8) 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. No new revisions were added by this update. Summary of changes: camel-dependencies/pom.xml | 6 +- .../camel/component/aws2/s3/AWS2S3Consumer.java| 4 +- .../camel/component/aws2/s3/AWS2S3Producer.java| 2 +- .../src/main/docs/platform-http-vertx.adoc | 5 +- .../camel/spring/processor/setExchangePattern.xml | 6 +- .../processor/setExchangePatternWithCustomId.xml | 6 +- .../engine/DefaultRuntimeEndpointRegistry.java | 4 +- .../camel/impl/console/HealthDevConsole.java | 7 +- .../org/apache/camel/main/BaseMainSupport.java | 28 +++--- .../ROOT/pages/camel-3x-upgrade-guide-3_18.adoc| 5 + .../ROOT/pages/camel-3x-upgrade-guide-3_19.adoc| 7 ++ .../ROOT/pages/camel-3x-upgrade-guide-3_20.adoc| 4 + .../modules/ROOT/pages/camel-jbang.adoc| 1 + .../dsl/jbang/core/commands/ExportBaseCommand.java | 2 +- .../java/org/apache/camel/main/KameletMain.java| 8 +- .../main/download/ArtifactDownloadListener.java| 34 +++ .../camel/main/download/DependencyDownloader.java | 5 + .../download/DependencyDownloaderRoutesLoader.java | 5 +- .../main/download/MavenDependencyDownloader.java | 16 ++- .../TypeConverterLoaderDownloadListener.java | 105 +++ .../org/apache/camel/routes-loader/camel.yaml | 2 + .../org/apache/camel/routes-loader/camelk.yaml | 2 + .../dsl/yaml/CamelKYamlRoutesBuilderLoader.java| 31 ++ .../dsl/yaml/CamelYamlRoutesBuilderLoader.java | 31 ++ .../camel/dsl/yaml/YamlRoutesBuilderLoader.java| 4 + .../camel/dsl/yaml/ChoiceCamelExtTest.groovy | 111 + .../camel/dsl/yaml/ChoiceCamelKExtTest.groovy | 111 + .../camel/dsl/yaml/support/YamlTestSupport.groovy | 10 +- parent/pom.xml | 6 +- .../HashicorpVaultLocalContainerServ
[camel] branch CAMEL-18617 updated (b33e5bfd7be -> eead0da651a)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git discard b33e5bfd7be CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add eead0da651a CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (b33e5bfd7be) \ N -- N -- N refs/heads/CAMEL-18617 (eead0da651a) 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. No new revisions were added by this update. Summary of changes: .../apache/camel/impl/health/ComponentsHealthCheckRepository.java| 5 ++--- .../src/main/java/org/apache/camel/main/BaseMainSupport.java | 2 +- .../java/org/apache/camel/main/HealthConfigurationProperties.java| 1 - 3 files changed, 3 insertions(+), 5 deletions(-)
[camel] branch CAMEL-18617 updated (a4c2fffc0f4 -> b33e5bfd7be)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git omit a4c2fffc0f4 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add b33e5bfd7be CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (a4c2fffc0f4) \ N -- N -- N refs/heads/CAMEL-18617 (b33e5bfd7be) 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. No new revisions were added by this update. Summary of changes: .../main/java/org/apache/camel/component/kafka/KafkaConsumer.java | 6 +++--- .../main/java/org/apache/camel/component/kafka/KafkaProducer.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
[camel] branch CAMEL-18617 updated (7879248d517 -> a4c2fffc0f4)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git omit 7879248d517 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add a4c2fffc0f4 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (7879248d517) \ N -- N -- N refs/heads/CAMEL-18617 (a4c2fffc0f4) 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. No new revisions were added by this update. Summary of changes: .../CamelMicroProfileHealthCheckRegistry.java | 3 +-- .../CamelMicroProfileHealthComponentsTest.java | 1 - .../health/CamelMicroProfileHealthTestHelper.java | 26 ++ .../health/CamelMicroProfileHealthTestSupport.java | 16 ++--- 4 files changed, 21 insertions(+), 25 deletions(-)
[camel] branch main-help created (now 0d6ac8d10d8)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main-help in repository https://gitbox.apache.org/repos/asf/camel.git at 0d6ac8d10d8 chore(main): fix warning about accessing MainHelpe static members via instance reference No new revisions were added by this update.
[camel] branch aws-deprecate created (now 1714818fedb)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch aws-deprecate in repository https://gitbox.apache.org/repos/asf/camel.git at 1714818fedb chore(aws-s3): fix deprecation warning No new revisions were added by this update.
[camel-spring-boot] branch CAMEL-18617 created (now d392da5e460)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git at d392da5e460 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled No new revisions were added by this update.
[camel] branch CAMEL-18617 updated (b405838240c -> 7879248d517)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git omit b405838240c CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add 7879248d517 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (b405838240c) \ N -- N -- N refs/heads/CAMEL-18617 (7879248d517) 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. No new revisions were added by this update. Summary of changes: .../CamelMicroProfileHealthCheckRegistry.java | 57 +- .../CamelMicroProfileHealthComponentsTest.java | 3 +- ...MicroProfileHealthSupervisedRoutesMainTest.java | 5 +- .../health/CamelMicroProfileHealthTestHelper.java | 5 +- .../health/CamelMicroProfileHealthTestSupport.java | 13 +++-- 5 files changed, 44 insertions(+), 39 deletions(-)
[camel] branch CAMEL-18617 updated (f0603c4c000 -> b405838240c)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git omit f0603c4c000 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled add b405838240c CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled 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 (f0603c4c000) \ N -- N -- N refs/heads/CAMEL-18617 (b405838240c) 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. No new revisions were added by this update. Summary of changes: .../camel/health-check/camel-kafka-repository | 2 - .../camel/component/kafka/KafkaConsumer.java | 8 +- .../camel/component/kafka/KafkaProducer.java | 8 +- ... => CamelMicroProfileHealthComponentsTest.java} | 69 --- ...MicroProfileHealthSupervisedRoutesMainTest.java | 89 +- .../health/CamelMicroProfileHealthTestHelper.java | 130 - .../health/CamelMicroProfileHealthTestSupport.java | 31 - ...are.java => WritableHealthCheckRepository.java} | 15 +-- .../health/ComponentsHealthCheckRepository.java| 6 +- 9 files changed, 194 insertions(+), 164 deletions(-) delete mode 100644 components/camel-kafka/src/generated/resources/META-INF/services/org/apache/camel/health-check/camel-kafka-repository copy components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/{CamelMicroProfileHealthConsumerTest.java => CamelMicroProfileHealthComponentsTest.java} (51%) copy core/camel-api/src/main/java/org/apache/camel/health/{HealthCheckAware.java => WritableHealthCheckRepository.java} (76%)
[camel] branch CAMEL-18617 created (now f0603c4c000)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch CAMEL-18617 in repository https://gitbox.apache.org/repos/asf/camel.git at f0603c4c000 CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled No new revisions were added by this update.
[camel-k-runtime] 02/02: chore: cleanup camel-k-maven-plugin dependencies
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit 90973369d0c4e450235a72b422162ec53bfce878 Author: Luca Burgazzoli AuthorDate: Thu Aug 25 14:54:20 2022 +0200 chore: cleanup camel-k-maven-plugin dependencies --- support/camel-k-maven-plugin/pom.xml | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/support/camel-k-maven-plugin/pom.xml b/support/camel-k-maven-plugin/pom.xml index 93214000..21a6fd40 100644 --- a/support/camel-k-maven-plugin/pom.xml +++ b/support/camel-k-maven-plugin/pom.xml @@ -43,36 +43,17 @@ org.apache.maven.plugin-tools maven-plugin-annotations - - -org.codehaus.plexus -plexus-utils - - +provided org.apache.maven.shared maven-common-artifact-filters - - -org.apache.maven -maven-repository-metadata - - -org.codehaus.plexus -plexus-utils - - +provided org.apache.maven maven-plugin-api - - -* -* - - +provided @@ -106,6 +87,10 @@ org.yaml snakeyaml + +commons-io +commons-io + com.fasterxml.jackson.core
[camel-k-runtime] 01/02: build(deps): bump maven-pmd-plugin from 3.17.0 to 3.18.0
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit 6132f35424a88993a50d0b599f1012f6bad73bf4 Author: Luca Burgazzoli AuthorDate: Thu Aug 25 14:53:59 2022 +0200 build(deps): bump maven-pmd-plugin from 3.17.0 to 3.18.0 --- pom.xml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1cedbe3..321564a0 100644 --- a/pom.xml +++ b/pom.xml @@ -77,8 +77,9 @@ 3.1.0 3.3.0 3.12.1 -3.17.0 +3.18.0 9.3 + 3.3.3 3.6.4 3.6.3 3.6.4 @@ -926,6 +927,11 @@ asm ${maven-pmd-plugin-asm-version} + +org.apache.maven.shared +maven-shared-utils + ${maven-pmd-plugin-shared-utils-version} +
[camel-k-runtime] branch main updated (daae5ab6 -> 90973369)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git from daae5ab6 [maven-release-plugin] prepare for next development iteration new 6132f354 build(deps): bump maven-pmd-plugin from 3.17.0 to 3.18.0 new 90973369 chore: cleanup camel-k-maven-plugin dependencies 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: pom.xml | 8 +++- support/camel-k-maven-plugin/pom.xml | 29 +++-- 2 files changed, 14 insertions(+), 23 deletions(-)
[camel-k-runtime] branch main updated: build(deps): bump maven-checkstyle-plugin from 3.1.2 to 3.2.0
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new c7273d50 build(deps): bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 c7273d50 is described below commit c7273d50778ff26eb5b3e2cc8fd5a106b5aa2c88 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Aug 24 19:02:29 2022 + build(deps): bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.1.2 to 3.2.0. - [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases) - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.1.2...maven-checkstyle-plugin-3.2.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b487266b..d108f6e5 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ 1.0 3.1.0 4.1 - 3.1.2 + 3.2.0 8.44 3.0.1 3.0.0
[camel-k-runtime] branch main updated (fd5827b9 -> c97c2803)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git from fd5827b9 fix: set quarkus core version to 2.11.2.Final add c97c2803 build(deps): bump quarkus-platform-version No new revisions were added by this update. Summary of changes: pom.xml | 2 +- support/camel-k-runtime-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
[camel-k-runtime] branch main updated: feat: replace custom kubernetes properties function with those provided by camel-kubernetes
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new 9093b236 feat: replace custom kubernetes properties function with those provided by camel-kubernetes 9093b236 is described below commit 9093b236d71e1203f1b3ea2f58be5d3900a0f9b6 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 16:43:16 2022 +0200 feat: replace custom kubernetes properties function with those provided by camel-kubernetes --- camel-k-core/support/pom.xml | 11 .../camel/k/listener/PropertiesConfigurer.java | 71 -- .../k/support/KubernetesPropertiesFunction.java| 69 - .../services/org.apache.camel.k.Runtime$Listener | 1 - .../PropertiesFunctionsConfigurerTest.java | 2 - camel-k-runtime/deployment/pom.xml | 8 +++ camel-k-runtime/runtime/pom.xml| 8 +++ .../k/quarkus/ApplicationConfigSourceProvider.java | 7 +++ itests/camel-k-itests-core/pom.xml | 5 ++ itests/camel-k-itests-loader-js/pom.xml| 5 ++ itests/camel-k-itests-loader-polyglot/pom.xml | 5 ++ itests/camel-k-itests-loader-xml/pom.xml | 5 ++ itests/camel-k-itests-loader-yaml/pom.xml | 5 ++ itests/camel-k-itests-master/pom.xml | 12 pom.xml| 5 ++ support/camel-k-runtime-bom/pom.xml| 1 + 16 files changed, 65 insertions(+), 155 deletions(-) diff --git a/camel-k-core/support/pom.xml b/camel-k-core/support/pom.xml index cd0caed9..b5a046eb 100644 --- a/camel-k-core/support/pom.xml +++ b/camel-k-core/support/pom.xml @@ -51,6 +51,10 @@ org.apache.camel camel-endpointdsl + +org.apache.camel +camel-kubernetes + @@ -63,6 +67,12 @@ camel-k-test test + +org.slf4j +slf4j-simple +${slf4j-version} +test + @@ -82,6 +92,7 @@ ${project.basedir} ${project.basedir}/src/test/resources/configmaps ${project.basedir}/src/test/resources/secrets + false diff --git a/camel-k-core/support/src/main/java/org/apache/camel/k/listener/PropertiesConfigurer.java b/camel-k-core/support/src/main/java/org/apache/camel/k/listener/PropertiesConfigurer.java deleted file mode 100644 index 2dadca5e.. --- a/camel-k-core/support/src/main/java/org/apache/camel/k/listener/PropertiesConfigurer.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.k.listener; - -import org.apache.camel.Ordered; -import org.apache.camel.k.Runtime; -import org.apache.camel.k.support.Constants; -import org.apache.camel.k.support.KubernetesPropertiesFunction; - -public class PropertiesConfigurer extends AbstractPhaseListener { -public PropertiesConfigurer() { -super(Runtime.Phase.ConfigureProperties); -} - -@Override -public int getOrder() { -return Ordered.HIGHEST; -} - -@Override -protected void accept(Runtime runtime) { -// -// Register properties functions to resolve k8s secrets or config maps like: -// -// {{secret:name/key}} -// {{configmap:name/key}} -// - -// -// ConfigMap -// -String cmPath = System.getProperty( -Constants.PROPERTY_CAMEL_K_MOUNT_PATH_CONFIGMAPS, -System.getenv(Constants.ENV_CAMEL_K_MOUNT_PATH_CONFIGMAPS) -); - -if (cmPath != null) { - runtime.getCamelContext().getPropertiesComponent().addPropertiesFunction( -new KubernetesPropertiesFunction(cmPath, "configmap") -); -} - -// -// Secret -// -String s
[camel-k-runtime] 10/10: chore: fix small code smell
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit 0b78b8f67cea56d2b53363b53c3555a743047b90 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 19:37:27 2022 +0200 chore: fix small code smell --- .../src/main/java/org/apache/camel/k/tooling/maven/GenerateSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateSupport.java b/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateSupport.java index 2f17bdff..107793bd 100644 --- a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateSupport.java +++ b/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateSupport.java @@ -32,7 +32,7 @@ public final class GenerateSupport { throw new IllegalStateException("Unable to find catalog-license.txt"); } -return IOUtils.toString(is, StandardCharsets.UTF_8.name()); +return IOUtils.toString(is, StandardCharsets.UTF_8); } } }
[camel-k-runtime] 09/10: chore: remove deprecated yaml dsl mojos
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit 38defedf4bc50db54a9d911670888de57eff5f1b Author: Luca Burgazzoli AuthorDate: Wed Aug 17 16:48:27 2022 +0200 chore: remove deprecated yaml dsl mojos --- pom.xml| 4 - .../tooling/maven/GenerateYamlEndpointsSchema.java | 146 -- .../maven/GenerateYamlLoaderSupportClasses.java| 272 -- .../maven/GenerateYamlParserSupportClasses.java| 290 --- .../camel/k/tooling/maven/GenerateYamlSchema.java | 564 - .../camel/k/tooling/maven/GenerateYamlSupport.java | 176 --- .../k/tooling/maven/support/IndexerSupport.java| 114 - .../k/tooling/maven/support/MavenSupport.java | 24 - .../k/tooling/maven/support/ToolingSupport.java| 58 --- .../processors/GenerateYamlSupportClassesTest.java | 57 --- 10 files changed, 1705 deletions(-) diff --git a/pom.xml b/pom.xml index 53e00e87..3eea8ea4 100644 --- a/pom.xml +++ b/pom.xml @@ -50,10 +50,6 @@ 3.0.12 2.9.0 - -2.2.14 -2.4.3.Final - 1.13.1 3.10.1 diff --git a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlEndpointsSchema.java b/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlEndpointsSchema.java deleted file mode 100644 index f4b42987.. --- a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlEndpointsSchema.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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.k.tooling.maven; - - -import java.io.File; -import java.io.IOException; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Objects; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.apache.camel.catalog.CamelCatalog; -import org.apache.camel.catalog.DefaultCamelCatalog; -import org.apache.camel.k.tooling.maven.support.ToolingSupport; -import org.apache.camel.tooling.model.ComponentModel; -import org.apache.camel.util.StringHelper; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; - -@Mojo( -name = "generate-yaml-endpoints-schema", -inheritByDefault = false, -defaultPhase = LifecyclePhase.GENERATE_SOURCES, -requiresDependencyResolution = ResolutionScope.COMPILE, -threadSafe = true, -requiresProject = false) -public class GenerateYamlEndpointsSchema extends GenerateYamlSupport { -@Parameter -protected List bannedDefinitions; -@Parameter(property = "camel.k.yaml.schema", defaultValue = "${project.build.directory}/yaml-${project.version}.json") -private File outputFile; - -private ObjectNode definitions; - -@Override -public void execute() throws MojoFailureException { -final ObjectMapper mapper = new ObjectMapper(); -final ObjectNode root = mapper.createObjectNode(); - -// Schema -root.put("$schema", "http://json-schema.org/draft-04/schema#;); -root.put("type", "object"); - -// Schema sections -this.definitions = root.putObject("definitions"); - -final CamelCatalog catalog = new DefaultCamelCatalog(); -for (String componentName : catalog.findComponentNames()) { -ComponentModel component = catalog.componentModel(componentName); -if (!definitions.has(component.getScheme())) { -ObjectNode node = definitions.putObject(component.getScheme()); -node.put("type", "object"); - -processEndpointOption(node, compo
[camel-k-runtime] 06/10: chore: fix wrong logging message
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit e199b358000459dd8eff5efa1bd9c6eb60eced63 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 17:29:16 2022 +0200 chore: fix wrong logging message --- .../src/main/java/org/apache/camel/k/support/SourcesSupport.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java b/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java index 80e9ad5b..6e993ce0 100644 --- a/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java +++ b/camel-k-core/support/src/main/java/org/apache/camel/k/support/SourcesSupport.java @@ -132,7 +132,7 @@ public final class SourcesSupport { break; case errorHandler: if (!source.getInterceptors().isEmpty()) { -LOGGER.warn("Interceptors associated to the route template {} will be ignored", source.getName()); +LOGGER.warn("Interceptors associated to the error handler {} will be ignored", source.getName()); } interceptors = List.of(new RouteBuilderLifecycleStrategy() {
[camel-k-runtime] 05/10: chore: update pmd rules
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit ac77426258ecd3754f700deb6321014476a04ea9 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 17:23:57 2022 +0200 chore: update pmd rules --- support/pmd-ruleset.xml | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/support/pmd-ruleset.xml b/support/pmd-ruleset.xml index 9c666c8e..c4a68463 100644 --- a/support/pmd-ruleset.xml +++ b/support/pmd-ruleset.xml @@ -27,8 +27,10 @@ .*/org/apache/camel/k/loader/yaml/support/.* .*/org/apache/camel/k/loader/yaml/parser/.* + + + - @@ -37,8 +39,8 @@ - - + + @@ -54,9 +56,6 @@ 4 - -4 - 4 @@ -79,16 +78,6 @@ - - - - - - - - - - @@ -104,5 +93,4 @@ -
[camel-k-runtime] branch main updated (d108ccf2 -> 0b78b8f6)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git from d108ccf2 Updated CHANGELOG.md new e011432a chore: disable noisy maven-remote-resources-plugin new d93097bf chore: replace deprecated quarkus-bootstrap-maven-plugin with quarkus-extension-maven-plugin new d0c0ab78 chore: remove deprecated configuration from camel-k-catalog module new e40a48bf chore: add empty file to prevent maven warnings new ac774262 chore: update pmd rules new e199b358 chore: fix wrong logging message new ff293f0f chore: remove unused CompositeClassloader class new 4c02ee6c chore: remove unused modules and dependencies new 38defedf chore: remove deprecated yaml dsl mojos new 0b78b8f6 chore: fix small code smell The 10 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: camel-k-cloudevents/runtime/pom.xml| 2 +- .../org/apache/camel/k/CompositeClassloader.java | 58 --- camel-k-core/runtime/pom.xml | 2 +- .../org/apache/camel/k/support/SourcesSupport.java | 2 +- camel-k-cron/runtime/pom.xml | 2 +- camel-k-knative/consumer/runtime/pom.xml | 2 +- camel-k-knative/producer/runtime/pom.xml | 2 +- camel-k-knative/runtime/pom.xml| 2 +- camel-k-master/runtime/pom.xml | 2 +- camel-k-resume-kafka/runtime/pom.xml | 2 +- camel-k-runtime/runtime/pom.xml| 2 +- camel-k-webhook/runtime/pom.xml| 2 +- .../camel-knative/camel-knative-test/pom.xml | 39 -- .../knative/test/KnativeEnvironmentSupport.java| 100 components/camel-knative/pom.xml | 36 -- components/pom.xml | 34 -- examples/cron/pom.xml | 2 +- examples/groovy/pom.xml| 2 +- examples/java/pom.xml | 2 +- examples/js/pom.xml| 2 +- examples/kafka-source-s3/pom.xml | 2 +- examples/kamelets-discovery/pom.xml| 2 +- examples/kamelets/pom.xml | 2 +- examples/knative/pom.xml | 2 +- examples/kotlin/pom.xml| 2 +- examples/xml/pom.xml | 2 +- examples/yaml/pom.xml | 2 +- pom.xml| 65 +-- support/camel-k-catalog/pom.xml| 1 - .../camel-k-catalog/src/main/resources/empty.txt | 1 + support/camel-k-maven-plugin/pom.xml | 8 - .../camel/k/tooling/maven/GenerateSupport.java | 2 +- .../tooling/maven/GenerateYamlEndpointsSchema.java | 146 -- .../maven/GenerateYamlLoaderSupportClasses.java| 272 -- .../maven/GenerateYamlParserSupportClasses.java| 290 --- .../camel/k/tooling/maven/GenerateYamlSchema.java | 564 - .../camel/k/tooling/maven/GenerateYamlSupport.java | 176 --- .../k/tooling/maven/support/IndexerSupport.java| 114 - .../k/tooling/maven/support/MavenSupport.java | 24 - .../k/tooling/maven/support/ToolingSupport.java| 58 --- .../processors/GenerateYamlSupportClassesTest.java | 57 --- support/camel-k-test/pom.xml | 16 - support/pmd-ruleset.xml| 22 +- 43 files changed, 39 insertions(+), 2088 deletions(-) delete mode 100644 camel-k-core/api/src/main/java/org/apache/camel/k/CompositeClassloader.java delete mode 100644 components/camel-knative/camel-knative-test/pom.xml delete mode 100644 components/camel-knative/camel-knative-test/src/main/java/org/apache/camel/component/knative/test/KnativeEnvironmentSupport.java delete mode 100644 components/camel-knative/pom.xml delete mode 100644 components/pom.xml create mode 100644 support/camel-k-catalog/src/main/resources/empty.txt delete mode 100644 support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlEndpointsSchema.java delete mode 100644 support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlLoaderSupportClasses.java delete mode 100644 support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlParserSupportClasses.java delete mode 100644 support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYamlSchema.java delete mode 100644 support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateYaml
[camel-k-runtime] 07/10: chore: remove unused CompositeClassloader class
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit ff293f0f4020d08c4b3fe97913619555f467bca2 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 18:20:19 2022 +0200 chore: remove unused CompositeClassloader class --- .../org/apache/camel/k/CompositeClassloader.java | 58 -- 1 file changed, 58 deletions(-) diff --git a/camel-k-core/api/src/main/java/org/apache/camel/k/CompositeClassloader.java b/camel-k-core/api/src/main/java/org/apache/camel/k/CompositeClassloader.java deleted file mode 100644 index a0b9958f.. --- a/camel-k-core/api/src/main/java/org/apache/camel/k/CompositeClassloader.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.k; - -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - -public class CompositeClassloader extends ClassLoader { -private final List loaders = new CopyOnWriteArrayList<>(); - -public CompositeClassloader() { -// no parent -} - -public CompositeClassloader(ClassLoader parent) { -super(parent); -} - -public CompositeClassloader(ClassLoader parent, ClassLoader... loaders) { -super(parent); -this.loaders.addAll(List.of(loaders)); -} - -public void addClassLoader(ClassLoader loader) { -loaders.add(loader); -} - -@Override -public Class loadClass(String name) throws ClassNotFoundException { -for (ClassLoader loader: loaders) { -try { -return loader.loadClass(name); -} catch (ClassNotFoundException ignored) { -// ignored -} -} - -return super.loadClass(name); -} - -public static CompositeClassloader wrap(ClassLoader parent) { -return parent != null ? new CompositeClassloader(parent) : new CompositeClassloader(); -} -}
[camel-k-runtime] 02/10: chore: replace deprecated quarkus-bootstrap-maven-plugin with quarkus-extension-maven-plugin
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit d93097bf9268c0df60dd62defdcb97cd1356f882 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 17:08:59 2022 +0200 chore: replace deprecated quarkus-bootstrap-maven-plugin with quarkus-extension-maven-plugin --- camel-k-cloudevents/runtime/pom.xml | 2 +- camel-k-core/runtime/pom.xml | 2 +- camel-k-cron/runtime/pom.xml | 2 +- camel-k-knative/consumer/runtime/pom.xml | 2 +- camel-k-knative/producer/runtime/pom.xml | 2 +- camel-k-knative/runtime/pom.xml | 2 +- camel-k-master/runtime/pom.xml | 2 +- camel-k-resume-kafka/runtime/pom.xml | 2 +- camel-k-runtime/runtime/pom.xml | 2 +- camel-k-webhook/runtime/pom.xml | 2 +- examples/cron/pom.xml| 2 +- examples/groovy/pom.xml | 2 +- examples/java/pom.xml| 2 +- examples/js/pom.xml | 2 +- examples/kafka-source-s3/pom.xml | 2 +- examples/kamelets-discovery/pom.xml | 2 +- examples/kamelets/pom.xml| 2 +- examples/knative/pom.xml | 2 +- examples/kotlin/pom.xml | 2 +- examples/xml/pom.xml | 2 +- examples/yaml/pom.xml| 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/camel-k-cloudevents/runtime/pom.xml b/camel-k-cloudevents/runtime/pom.xml index 9811cd64..52a0d3ce 100644 --- a/camel-k-cloudevents/runtime/pom.xml +++ b/camel-k-cloudevents/runtime/pom.xml @@ -42,7 +42,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-core/runtime/pom.xml b/camel-k-core/runtime/pom.xml index 29a3b3ca..0cfae493 100644 --- a/camel-k-core/runtime/pom.xml +++ b/camel-k-core/runtime/pom.xml @@ -60,7 +60,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-cron/runtime/pom.xml b/camel-k-cron/runtime/pom.xml index 232d263c..b35104dc 100644 --- a/camel-k-cron/runtime/pom.xml +++ b/camel-k-cron/runtime/pom.xml @@ -46,7 +46,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-knative/consumer/runtime/pom.xml b/camel-k-knative/consumer/runtime/pom.xml index 82b82bff..6567ca61 100644 --- a/camel-k-knative/consumer/runtime/pom.xml +++ b/camel-k-knative/consumer/runtime/pom.xml @@ -58,7 +58,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-knative/producer/runtime/pom.xml b/camel-k-knative/producer/runtime/pom.xml index 68d85297..49d1270c 100644 --- a/camel-k-knative/producer/runtime/pom.xml +++ b/camel-k-knative/producer/runtime/pom.xml @@ -58,7 +58,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-knative/runtime/pom.xml b/camel-k-knative/runtime/pom.xml index b9ca98bd..2511fd2f 100644 --- a/camel-k-knative/runtime/pom.xml +++ b/camel-k-knative/runtime/pom.xml @@ -59,7 +59,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-master/runtime/pom.xml b/camel-k-master/runtime/pom.xml index 05ba36d9..f08ac555 100644 --- a/camel-k-master/runtime/pom.xml +++ b/camel-k-master/runtime/pom.xml @@ -50,7 +50,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version} diff --git a/camel-k-resume-kafka/runtime/pom.xml b/camel-k-resume-kafka/runtime/pom.xml index bfb9263e..c6242fff 100644 --- a/camel-k-resume-kafka/runtime/pom.xml +++ b/camel-k-resume-kafka/runtime/pom.xml @@ -43,7 +43,7 @@ io.quarkus -quarkus-bootstrap-maven-plugin +quarkus-extension-maven-plugin ${quarkus-version
[camel-k-runtime] 08/10: chore: remove unused modules and dependencies
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit 4c02ee6c8eb29e1a4c8cf30ffcd82791ce3911f1 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 19:31:51 2022 +0200 chore: remove unused modules and dependencies --- .../camel-knative/camel-knative-test/pom.xml | 39 .../knative/test/KnativeEnvironmentSupport.java| 100 - components/camel-knative/pom.xml | 36 components/pom.xml | 34 --- pom.xml| 51 --- support/camel-k-maven-plugin/pom.xml | 8 -- support/camel-k-test/pom.xml | 16 7 files changed, 284 deletions(-) diff --git a/components/camel-knative/camel-knative-test/pom.xml b/components/camel-knative/camel-knative-test/pom.xml deleted file mode 100644 index ed2e1c06.. --- a/components/camel-knative/camel-knative-test/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - -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/xsd/maven-4.0.0.xsd;> - -org.apache.camel.k -camel-knative-parent -1.14.0-SNAPSHOT - -4.0.0 - -camel-knative-test - - - - -org.apache.camel -camel-knative-api - - - - - diff --git a/components/camel-knative/camel-knative-test/src/main/java/org/apache/camel/component/knative/test/KnativeEnvironmentSupport.java b/components/camel-knative/camel-knative-test/src/main/java/org/apache/camel/component/knative/test/KnativeEnvironmentSupport.java deleted file mode 100644 index 0f6e72d3.. --- a/components/camel-knative/camel-knative-test/src/main/java/org/apache/camel/component/knative/test/KnativeEnvironmentSupport.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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.component.knative.test; - -import java.util.Map; - -import org.apache.camel.component.knative.spi.Knative; -import org.apache.camel.component.knative.spi.KnativeEnvironment; -import org.apache.camel.component.knative.spi.KnativeResource; - -public final class KnativeEnvironmentSupport { -private KnativeEnvironmentSupport() { -} - -public static KnativeResource endpoint(Knative.EndpointKind endpointKind, String name, String url) { -return KnativeEnvironment.serviceBuilder(Knative.Type.endpoint, name) -.withUrl(url) -.withEndpointKind(endpointKind) -.build(); -} - -public static KnativeResource endpoint(Knative.EndpointKind endpointKind, String name, String url, Map metadata) { -return KnativeEnvironment.serviceBuilder(Knative.Type.endpoint, name) -.withUrl(url) -.withMeta(metadata) -.withEndpointKind(endpointKind) -.build(); -} - -public static KnativeResource sourceEndpoint(String name, Map metadata) { -return KnativeEnvironment.serviceBuilder(Knative.Type.endpoint, name) -.withMeta(metadata) -.withEndpointKind(Knative.EndpointKind.source) -.build(); -} - -public static KnativeResource channel(Knative.EndpointKind endpointKind, String name, String url) { -return KnativeEnvironment.serviceBuilder(Knative.Type.channel, name) -.withUrl(url) -.withEndpointKind(endpointKind) -.build(); -} - -public static KnativeResource channel(Knative.EndpointKind endpointKind, String name, String url, Map metadata) { -return KnativeEnvironment.serviceBuilder(Knative.Type.channel, name) -.withUrl(url) -.withMeta(metadata) -.withEndpointKind(endpointKind) -.build(); -} - -public static KnativeResource sourceChannel(String name, Map metadata) { -return KnativeEnvironment.serviceBuilder(Knative.Type.channel, name) -.withMeta(metadat
[camel-k-runtime] 04/10: chore: add empty file to prevent maven warnings
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit e40a48bf51d2554edb6521982302a70006a190b2 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 17:15:48 2022 +0200 chore: add empty file to prevent maven warnings --- support/camel-k-catalog/src/main/resources/empty.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/support/camel-k-catalog/src/main/resources/empty.txt b/support/camel-k-catalog/src/main/resources/empty.txt new file mode 100644 index ..8f42ef5a --- /dev/null +++ b/support/camel-k-catalog/src/main/resources/empty.txt @@ -0,0 +1 @@ +// deliberately left empty \ No newline at end of file
[camel-k-runtime] 01/10: chore: disable noisy maven-remote-resources-plugin
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit e011432a7b9e5a32d27a57cf8d27f2e3047b2591 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 16:59:03 2022 +0200 chore: disable noisy maven-remote-resources-plugin --- pom.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/pom.xml b/pom.xml index 4e8d06d0..1eb085aa 100644 --- a/pom.xml +++ b/pom.xml @@ -322,6 +322,16 @@ + +org.apache.maven.plugins +maven-remote-resources-plugin + + +process-resource-bundles +none + + + org.commonjava.maven.plugins directory-maven-plugin
[camel-k-runtime] 03/10: chore: remove deprecated configuration from camel-k-catalog module
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git commit d0c0ab78ce8bdd90c59ed174f567507ba74b130a Author: Luca Burgazzoli AuthorDate: Wed Aug 17 17:10:35 2022 +0200 chore: remove deprecated configuration from camel-k-catalog module --- support/camel-k-catalog/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/support/camel-k-catalog/pom.xml b/support/camel-k-catalog/pom.xml index f59684b2..f97ea84b 100644 --- a/support/camel-k-catalog/pom.xml +++ b/support/camel-k-catalog/pom.xml @@ -64,7 +64,6 @@ ${project.build.directory} camel-k-catalog-${project.version}.yaml -main
[camel] branch main updated: feat: add a global route builder interceptors
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 ff375a00060 feat: add a global route builder interceptors ff375a00060 is described below commit ff375a00060148926c321adb342ee4bd44f82e93 Author: Luca Burgazzoli AuthorDate: Wed Aug 17 11:01:32 2022 +0200 feat: add a global route builder interceptors --- .../org/apache/camel/builder/RouteBuilder.java | 9 ++- .../builder/RouteBuilderLifecycleStrategy.java | 16 - .../org/apache/camel/builder/RouteBuilderTest.java | 69 ++ 3 files changed, 91 insertions(+), 3 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java index 622b581e835..359bad8d584 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java @@ -18,6 +18,7 @@ package org.apache.camel.builder; import java.io.Reader; import java.util.ArrayList; +import java.util.Comparator; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; @@ -665,7 +666,11 @@ public abstract class RouteBuilder extends BuilderSupport implements RoutesBuild camelContext.adapt(ExtendedCamelContext.class).getErrorHandlerFactory()); } -for (RouteBuilderLifecycleStrategy interceptor : lifecycleInterceptors) { +List strategies = new ArrayList<>(lifecycleInterceptors); + strategies.addAll(camelContext.getRegistry().findByType(RouteBuilderLifecycleStrategy.class)); +strategies.sort(Comparator.comparing(Ordered::getOrder)); + +for (RouteBuilderLifecycleStrategy interceptor : strategies) { interceptor.beforeConfigure(this); } @@ -679,7 +684,7 @@ public abstract class RouteBuilder extends BuilderSupport implements RoutesBuild getRouteCollection().prepareRoute(route); } -for (RouteBuilderLifecycleStrategy interceptor : lifecycleInterceptors) { +for (RouteBuilderLifecycleStrategy interceptor : strategies) { interceptor.afterConfigure(this); } } diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilderLifecycleStrategy.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilderLifecycleStrategy.java index dc6b8d4f594..61af4c72ab3 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilderLifecycleStrategy.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilderLifecycleStrategy.java @@ -16,10 +16,12 @@ */ package org.apache.camel.builder; +import org.apache.camel.Ordered; + /** * Strategy for {@link RouteBuilder} lifecycle notifications. */ -public interface RouteBuilderLifecycleStrategy { +public interface RouteBuilderLifecycleStrategy extends Ordered { /** * This method is invoked before the {@link RouteBuilder#configure()} method is invoked. */ @@ -31,4 +33,16 @@ public interface RouteBuilderLifecycleStrategy { */ default void afterConfigure(RouteBuilder builder) { } + +/** + * Gets the order. + * + * Default to {@link Ordered#LOWEST}. + * + * @return the order + */ +@Override +default int getOrder() { +return Ordered.LOWEST; +} } diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java index f5f6228e26e..183b91959f8 100644 --- a/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java @@ -19,6 +19,7 @@ package org.apache.camel.builder; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.CamelContext; @@ -26,6 +27,7 @@ import org.apache.camel.Channel; import org.apache.camel.DelegateProcessor; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; +import org.apache.camel.Ordered; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.Route; @@ -579,4 +581,71 @@ public class RouteBuilderTest extends TestSupport { assertEquals(1, before.get()); assertEquals(1, after.get()); } + +@Test +public void testLifecycleInterceptorFromContext() throws Exception { +List ordered = new ArrayList<>(); + +RouteBuilder builder = new
[camel-k] branch main updated: fix actions/setup-java parameters
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 2d61b8220 fix actions/setup-java parameters 2d61b8220 is described below commit 2d61b8220942101965f3b8eac89e19f7d448d334 Author: Luca Burgazzoli AuthorDate: Tue Aug 16 08:14:09 2022 +0200 fix actions/setup-java parameters --- .github/workflows/release-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 6e6ce104c..fdb3eb130 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -40,7 +40,7 @@ jobs: - name: Set up JDK ${{ inputs.javaVersion }} uses: actions/setup-java@v2 with: - version: ${{ inputs.javaVersion }} + java-version: ${{ inputs.javaVersion }} distribution: "temurin" - name: Install Go ${{ inputs.goVersion }} uses: actions/setup-go@v2
[camel-k-runtime] branch main updated: build(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new f4698386 build(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1 f4698386 is described below commit f4698386cbaf7fa5db2705a56c3e8d7bd8c7481f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Mon Aug 15 19:02:33 2022 + build(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1 Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.0...maven-javadoc-plugin-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- support/camel-k-runtime-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0de91e7b..4e8d06d0 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ 8.44 3.0.1 3.0.0 -3.4.0 +3.4.1 3.2.1 3.3.0 1.2.3 diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index 38f5e687..c1117675 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -276,7 +276,7 @@ org.apache.maven.plugins maven-javadoc-plugin -3.4.0 +3.4.1 attach-javadocs
[camel-k-runtime] branch main updated: build(deps): bump quarkus-platform-version
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new a433a518 build(deps): bump quarkus-platform-version a433a518 is described below commit a433a518428b21917d4c7aba4e376cfe8c248e6c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Fri Aug 5 19:03:07 2022 + build(deps): bump quarkus-platform-version Bumps `quarkus-platform-version` from 2.11.1.Final to 2.11.2.Final. Updates `quarkus-bom` from 2.11.1.Final to 2.11.2.Final - [Release notes](https://github.com/quarkusio/quarkus-platform/releases) - [Commits](https://github.com/quarkusio/quarkus-platform/compare/2.11.1.Final...2.11.2.Final) Updates `quarkus-camel-bom` from 2.11.1.Final to 2.11.2.Final - [Release notes](https://github.com/quarkusio/quarkus-platform/releases) - [Commits](https://github.com/quarkusio/quarkus-platform/compare/2.11.1.Final...2.11.2.Final) --- updated-dependencies: - dependency-name: io.quarkus.platform:quarkus-bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus.platform:quarkus-camel-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- support/camel-k-runtime-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 82913a00..0de91e7b 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 2.11.0 2.11.0.Final -2.11.1.Final +2.11.2.Final quay.io/quarkus/ubi-quarkus-native-image:22.1.0-java11 diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index 04726158..38f5e687 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -37,7 +37,7 @@ 3.1.0 3.6.3 -2.11.1.Final +2.11.2.Final
[camel-k-runtime] branch main updated: build(deps): bump maven-site-plugin from 3.12.0 to 3.12.1
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new 5fab9a58 build(deps): bump maven-site-plugin from 3.12.0 to 3.12.1 5fab9a58 is described below commit 5fab9a58baf145705061573bdc266b6221175a1a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Thu Aug 4 19:02:52 2022 + build(deps): bump maven-site-plugin from 3.12.0 to 3.12.1 Bumps [maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.12.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.12.0...maven-site-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 139ceaaa..82913a00 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ 3.2.0 3.1.0 3.3.0 -3.12.0 +3.12.1 3.17.0 9.3 3.6.4
[camel-k] 03/03: fix: KameletBinding vs Integration traits comparison shouyld be based on the traits configured on the KameletBinding only #3479
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit e7bc5eccadf3c4cd89e998726c01a96e189fc6b7 Author: Luca Burgazzoli AuthorDate: Fri Aug 5 11:50:54 2022 +0200 fix: KameletBinding vs Integration traits comparison shouyld be based on the traits configured on the KameletBinding only #3479 --- pkg/controller/integration/kits.go | 8 pkg/trait/util.go | 41 +++--- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/pkg/controller/integration/kits.go b/pkg/controller/integration/kits.go index 1e4bd9b84..433d96180 100644 --- a/pkg/controller/integration/kits.go +++ b/pkg/controller/integration/kits.go @@ -114,11 +114,11 @@ func integrationMatches(integration *v1.Integration, kit *v1.IntegrationKit) (bo // A kit can be used only if it contains a subset of the traits and related configurations // declared on integration. - itc, err := trait.NewUnstructuredTraitsForIntegration(integration) + itc, err := trait.NewTraitsOptionsForIntegration(integration) if err != nil { return false, err } - ikc, err := trait.NewUnstructuredTraitsForIntegrationKit(kit) + ikc, err := trait.NewTraitsOptionsForIntegrationKit(kit) if err != nil { return false, err } @@ -170,11 +170,11 @@ func kitMatches(kit1 *v1.IntegrationKit, kit2 *v1.IntegrationKit) (bool, error) return false, nil } - c1, err := trait.NewUnstructuredTraitsForIntegrationKit(kit1) + c1, err := trait.NewTraitsOptionsForIntegrationKit(kit1) if err != nil { return false, err } - c2, err := trait.NewUnstructuredTraitsForIntegrationKit(kit2) + c2, err := trait.NewTraitsOptionsForIntegrationKit(kit2) if err != nil { return false, err } diff --git a/pkg/trait/util.go b/pkg/trait/util.go index 737b54883..880098c71 100644 --- a/pkg/trait/util.go +++ b/pkg/trait/util.go @@ -347,11 +347,11 @@ func Equals(i1 Options, i2 Options) bool { // IntegrationsHaveSameTraits return if traits are the same. func IntegrationsHaveSameTraits(i1 *v1.Integration, i2 *v1.Integration) (bool, error) { - c1, err := NewUnstructuredTraitsForIntegration(i1) + c1, err := NewTraitsOptionsForIntegration(i1) if err != nil { return false, err } - c2, err := NewUnstructuredTraitsForIntegration(i2) + c2, err := NewTraitsOptionsForIntegration(i2) if err != nil { return false, err } @@ -361,11 +361,11 @@ func IntegrationsHaveSameTraits(i1 *v1.Integration, i2 *v1.Integration) (bool, e // IntegrationKitsHaveSameTraits return if traits are the same. func IntegrationKitsHaveSameTraits(i1 *v1.IntegrationKit, i2 *v1.IntegrationKit) (bool, error) { - c1, err := NewUnstructuredTraitsForIntegrationKit(i1) + c1, err := NewTraitsOptionsForIntegrationKit(i1) if err != nil { return false, err } - c2, err := NewUnstructuredTraitsForIntegrationKit(i2) + c2, err := NewTraitsOptionsForIntegrationKit(i2) if err != nil { return false, err } @@ -375,11 +375,11 @@ func IntegrationKitsHaveSameTraits(i1 *v1.IntegrationKit, i2 *v1.IntegrationKit) // KameletBindingsHaveSameTraits return if traits are the same. func KameletBindingsHaveSameTraits(i1 *v1alpha1.KameletBinding, i2 *v1alpha1.KameletBinding) (bool, error) { - c1, err := NewUnstructuredTraitsForKameletBinding(i1) + c1, err := NewTraitsOptionsForKameletBinding(i1) if err != nil { return false, err } - c2, err := NewUnstructuredTraitsForKameletBinding(i2) + c2, err := NewTraitsOptionsForKameletBinding(i2) if err != nil { return false, err } @@ -388,34 +388,43 @@ func KameletBindingsHaveSameTraits(i1 *v1alpha1.KameletBinding, i2 *v1alpha1.Kam } // IntegrationAndBindingSameTraits return if traits are the same. +// The comparison is done for the subset of traits defines on the binding as during the trait processing, +// some traits may be added to the Integration i.e. knative configuration in case of sink binding. func IntegrationAndBindingSameTraits(i1 *v1.Integration, i2 *v1alpha1.KameletBinding) (bool, error) { - c1, err := NewUnstructuredTraitsForIntegration(i1) + itOpts, err := NewTraitsOptionsForIntegration(i1) if err != nil { return false, err } - c2, err := NewUnstructuredTraitsForKameletBinding(i2) + klbOpts, err := NewTraitsOptionsForKameletBinding(i2) if err != nil { return false, err } - return Equals(c1, c2), nil + toCompare := make(Options) + for k
[camel-k] branch main updated (a6f223656 -> e7bc5ecca)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from a6f223656 Fix grammar in integration-kit.adoc new b1b70e0fb fix: camel-k ignores changes to traits configured using annotations #3479 new beff4641a fix: resolve pr review findings #3479 new e7bc5ecca fix: KameletBinding vs Integration traits comparison shouyld be based on the traits configured on the KameletBinding only #3479 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: .../common/kamelet_binding_with_image_test.go | 116 +++ e2e/support/test_support.go| 44 .../integration/integration_controller.go | 203 ++ pkg/controller/integration/kits.go | 69 --- pkg/controller/integration/kits_test.go| 10 +- .../kameletbinding/kamelet_binding_controller.go | 15 ++ pkg/controller/kameletbinding/monitor.go | 16 +- pkg/trait/util.go | 228 - pkg/trait/util_test.go | 177 +++- pkg/util/digest/digest.go | 4 + pkg/util/kubernetes/util.go| 3 +- 11 files changed, 757 insertions(+), 128 deletions(-) create mode 100644 e2e/global/common/kamelet_binding_with_image_test.go
[camel-k] 01/03: fix: camel-k ignores changes to traits configured using annotations #3479
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit b1b70e0fbb04b4c445a0e87b82f2c87c64cf3f6e Author: Luca Burgazzoli AuthorDate: Sun Jul 24 15:04:37 2022 +0200 fix: camel-k ignores changes to traits configured using annotations #3479 --- .../common/kamelet_binding_with_image_test.go | 120 +++ e2e/support/test_support.go| 40 .../integration/integration_controller.go | 203 +++ pkg/controller/integration/kits.go | 69 --- pkg/controller/integration/kits_test.go| 10 +- .../kameletbinding/kamelet_binding_controller.go | 15 ++ pkg/controller/kameletbinding/monitor.go | 16 +- pkg/trait/util.go | 219 - pkg/trait/util_test.go | 177 - pkg/util/digest/digest.go | 4 + pkg/util/kubernetes/util.go| 3 +- 11 files changed, 748 insertions(+), 128 deletions(-) diff --git a/e2e/global/common/kamelet_binding_with_image_test.go b/e2e/global/common/kamelet_binding_with_image_test.go new file mode 100644 index 0..129089e51 --- /dev/null +++ b/e2e/global/common/kamelet_binding_with_image_test.go @@ -0,0 +1,120 @@ +//go:build integration +// +build integration + +// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration" + +/* +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 common + +import ( + "github.com/onsi/gomega/gstruct" + "testing" + + . "github.com/apache/camel-k/e2e/support" + . "github.com/onsi/gomega" + + corev1 "k8s.io/api/core/v1" + + "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" +) + +func TestBindingWithImage(t *testing.T) { + WithNewTestNamespace(t, func(ns string) { + operatorID := "camel-k-binding-image" + bindingID := "with-image-binding" + + Expect(KamelInstallWithID(operatorID, ns).Execute()).To(Succeed()) + + from := corev1.ObjectReference{ + Kind: "Kamelet", + Name: "my-own-timer-source", + APIVersion: v1alpha1.SchemeGroupVersion.String(), + } + + to := corev1.ObjectReference{ + Kind: "Kamelet", + Name: "my-own-log-sink", + APIVersion: v1alpha1.SchemeGroupVersion.String(), + } + + emptyMap := map[string]string{} + + annotations1 := map[string]string{ + "trait.camel.apache.org/container.image": "docker.io/jmalloc/echo-server:0.3.2", + "trait.camel.apache.org/jvm.enabled": "false", + "trait.camel.apache.org/kamelets.enabled": "false", + "trait.camel.apache.org/dependencies.enabled": "false", + "test": "1", + } + annotations2 := map[string]string{ + "trait.camel.apache.org/container.image": "docker.io/jmalloc/echo-server:0.3.3", + "trait.camel.apache.org/jvm.enabled": "false", + "trait.camel.apache.org/kamelets.enabled": "false", + "trait.camel.apache.org/dependencies.enabled": "false", + "test": "2", + } + + t.Run("run with initial image", func(t *testing.T) { + expectedImage := annotations1["trait.camel.apache.org/container.image"] + +
[camel-k] 02/03: fix: resolve pr review findings #3479
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit beff4641a7d7f5a99209207886f9b03784ac95bd Author: Luca Burgazzoli AuthorDate: Wed Aug 3 13:47:26 2022 +0200 fix: resolve pr review findings #3479 --- .../common/kamelet_binding_with_image_test.go | 16 ++-- e2e/support/test_support.go| 6 +- .../integration/integration_controller.go | 4 ++-- pkg/controller/integration/kits.go | 2 +- pkg/controller/kameletbinding/monitor.go | 4 ++-- pkg/trait/util.go | 22 +++--- pkg/trait/util_test.go | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/e2e/global/common/kamelet_binding_with_image_test.go b/e2e/global/common/kamelet_binding_with_image_test.go index 129089e51..e28132c59 100644 --- a/e2e/global/common/kamelet_binding_with_image_test.go +++ b/e2e/global/common/kamelet_binding_with_image_test.go @@ -79,13 +79,11 @@ func TestBindingWithImage(t *testing.T) { To(Succeed()) Eventually(IntegrationGeneration(ns, bindingID)). Should(gstruct.PointTo(BeNumerically("==", 1))) - Eventually(IntegrationAnnotations(ns, bindingID)). - Should(HaveKeyWithValue("test", "1")) - Eventually(IntegrationAnnotations(ns, bindingID)). - Should(HaveKeyWithValue("trait.camel.apache.org/container.image", expectedImage)) + Eventually(Integration(ns, bindingID)).Should(WithTransform(Annotations, And( + HaveKeyWithValue("test", "1"))), + HaveKeyWithValue("trait.camel.apache.org/container.image", expectedImage)) Eventually(IntegrationStatusImage(ns, bindingID)). Should(Equal(expectedImage)) - Eventually(IntegrationPodPhase(ns, bindingID), TestTimeoutLong). Should(Equal(corev1.PodRunning)) Eventually(IntegrationPodImage(ns, bindingID)). @@ -101,13 +99,11 @@ func TestBindingWithImage(t *testing.T) { To(Succeed()) Eventually(IntegrationGeneration(ns, bindingID)). Should(gstruct.PointTo(BeNumerically("==", 1))) - Eventually(IntegrationAnnotations(ns, bindingID)). - Should(HaveKeyWithValue("test", "2")) - Eventually(IntegrationAnnotations(ns, bindingID)). - Should(HaveKeyWithValue("trait.camel.apache.org/container.image", expectedImage)) + Eventually(Integration(ns, bindingID)).Should(WithTransform(Annotations, And( + HaveKeyWithValue("test", "2"))), + HaveKeyWithValue("trait.camel.apache.org/container.image", expectedImage)) Eventually(IntegrationStatusImage(ns, bindingID)). Should(Equal(expectedImage)) - Eventually(IntegrationPodPhase(ns, bindingID), TestTimeoutLong). Should(Equal(corev1.PodRunning)) Eventually(IntegrationPodImage(ns, bindingID)). diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index 8cfa8d1fa..509c3b3ff 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -555,7 +555,7 @@ func IntegrationGeneration(ns string, name string) func() *int64 { } } -func IntegrationStatusObserverGeneration(ns string, name string) func() *int64 { +func IntegrationObservedGeneration(ns string, name string) func() *int64 { return func() *int64 { it := Integration(ns, name)() if it == nil { @@ -643,6 +643,10 @@ func AssignIntegrationToOperator(ns, name, operator string) error { return TestClient().Update(TestContext, it) } +func Annotations(object metav1.Object) map[string]string { + return object.GetAnnotations() +} + func Lease(ns string, name string) func() *coordination.Lease { return func() *coordination.Lease { lease := coordination.Lease{} diff --git a/pkg/controller/integration/integration_controller.go b/pkg/controller/integration/integration_controller.go index 0d0f61d20..bd9a19937 100644 --- a/pkg/controller/integration/integration_controller.go +++ b/pkg/controller/integration/integration_controller.go @@ -127,11 +127,11 @@ func in
[camel-k] branch main updated: fix: ensure gobin exists before copying operator-sdk
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/main by this push: new 78e099cee fix: ensure gobin exists before copying operator-sdk 78e099cee is described below commit 78e099cee923a12d67a352b7bd6edfd0a5ee4a82 Author: Luca Burgazzoli AuthorDate: Thu Aug 4 23:51:36 2022 +0200 fix: ensure gobin exists before copying operator-sdk --- script/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/script/Makefile b/script/Makefile index ac74e2dd4..6d159f2e6 100644 --- a/script/Makefile +++ b/script/Makefile @@ -520,6 +520,7 @@ ifeq (, $(shell command -v operator-sdk 2> /dev/null)) -L https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS_LOWER)_amd64 \ -o operator-sdk ; \ chmod +x operator-sdk ;\ + mkdir -p $(GOBIN) ;\ mv operator-sdk $(GOBIN)/ ;\ } OPERATOR_SDK=$(GOBIN)/operator-sdk
[camel-k] 02/02: fix: force the creation of the build/_maven_output to prevent image building from failing
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit eeb3b18c5672745f31e8eb0128c0f12ca5dec04d Author: Luca Burgazzoli AuthorDate: Wed Aug 3 14:55:07 2022 +0200 fix: force the creation of the build/_maven_output to prevent image building from failing --- script/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/Makefile b/script/Makefile index 2efae5375..ac74e2dd4 100644 --- a/script/Makefile +++ b/script/Makefile @@ -388,10 +388,12 @@ kamel-overlay: images: build kamel-overlay maven-overlay bundle-kamelets @echo "### Building Camel K operator container image..." + mkdir -p build/_maven_output docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-arch: build kamel-overlay maven-overlay bundle-kamelets @echo "### Building Camel K operator container image for multi architectures..." + mkdir -p build/_maven_output docker buildx rm --all-inactive --force docker buildx create --append --name builder ifeq ($(shell uname -m), x86_x64)
[camel-k] branch main updated (58fa430a6 -> eeb3b18c5)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git from 58fa430a6 regen new 41f909d27 chore: add gitignore directove for platform specific build new eeb3b18c5 fix: force the creation of the build/_maven_output to prevent image building from failing 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: .gitignore | 1 + script/Makefile | 2 ++ 2 files changed, 3 insertions(+)
[camel-k] 01/02: chore: add gitignore directove for platform specific build
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git commit 41f909d27dcf1bfe1f8ba69c65526957657680c1 Author: Luca Burgazzoli AuthorDate: Wed Aug 3 14:54:30 2022 +0200 chore: add gitignore directove for platform specific build --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 75e386502..1702b92a4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # Binary files /kamel +/kamel.* /license-check /**/platform-check
[camel-k-runtime] branch main updated: build(deps): bump apache from 26 to 27
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new 2cf168c7 build(deps): bump apache from 26 to 27 2cf168c7 is described below commit 2cf168c74d20daa709098abd117c73eb3c370fde Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Thu Jul 14 19:02:09 2022 + build(deps): bump apache from 26 to 27 Bumps [apache](https://github.com/apache/maven-apache-parent) from 26 to 27. - [Release notes](https://github.com/apache/maven-apache-parent/releases) - [Commits](https://github.com/apache/maven-apache-parent/commits) --- updated-dependencies: - dependency-name: org.apache:apache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- support/camel-k-runtime-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index d6bdd7ab..a0fb7e74 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -22,7 +22,7 @@ org.apache apache -26 +27 4.0.0
[camel-k-runtime] branch main updated: build(deps): bump exec-maven-plugin from 3.0.0 to 3.1.0
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new e8cec9c3 build(deps): bump exec-maven-plugin from 3.0.0 to 3.1.0 e8cec9c3 is described below commit e8cec9c3fbed74619195730dbcf4e788c6b3995e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Fri Jul 15 19:02:12 2022 + build(deps): bump exec-maven-plugin from 3.0.0 to 3.1.0 Bumps [exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/mojohaus/exec-maven-plugin/releases) - [Commits](https://github.com/mojohaus/exec-maven-plugin/compare/exec-maven-plugin-3.0.0...exec-maven-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:exec-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 575760d4..adc23085 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 3.0.0-M7 2.11.0 1.0 -3.0.0 +3.1.0 4.1 3.1.2 8.44
[camel] branch main updated: feat: add exchange constants related to the schema of the message payload
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 1a10579ae81 feat: add exchange constants related to the schema of the message payload 1a10579ae81 is described below commit 1a10579ae81da9e9cd5f23529b6738b653fbadfa Author: Luca Burgazzoli AuthorDate: Tue Jun 21 11:23:58 2022 +0200 feat: add exchange constants related to the schema of the message payload --- .../java/org/apache/camel/ExchangeConstantProvider.java | 4 +++- core/camel-api/src/main/java/org/apache/camel/Exchange.java | 13 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/camel-api/src/generated/java/org/apache/camel/ExchangeConstantProvider.java b/core/camel-api/src/generated/java/org/apache/camel/ExchangeConstantProvider.java index b9ff62dad1b..d495cac7f9a 100644 --- a/core/camel-api/src/generated/java/org/apache/camel/ExchangeConstantProvider.java +++ b/core/camel-api/src/generated/java/org/apache/camel/ExchangeConstantProvider.java @@ -11,7 +11,7 @@ public class ExchangeConstantProvider { private static final Map MAP; static { -Map map = new HashMap<>(152); +Map map = new HashMap<>(154); map.put("ACCEPT_CONTENT_TYPE", "CamelAcceptContentType"); map.put("AGGREGATED_COLLECTION_GUARD", "CamelAggregatedCollectionGuard"); map.put("AGGREGATED_COMPLETED_BY", "CamelAggregatedCompletedBy"); @@ -37,6 +37,8 @@ public class ExchangeConstantProvider { map.put("COMPILE_SCRIPT", "CamelCompileScript"); map.put("CONTENT_ENCODING", "Content-Encoding"); map.put("CONTENT_LENGTH", "Content-Length"); +map.put("CONTENT_SCHEMA", "CamelContentSchema"); +map.put("CONTENT_SCHEMA_TYPE", "CamelContentSchemaType"); map.put("CONTENT_TYPE", "Content-Type"); map.put("COOKIE_HANDLER", "CamelCookieHandler"); map.put("CORRELATION_ID", "CamelCorrelationId"); diff --git a/core/camel-api/src/main/java/org/apache/camel/Exchange.java b/core/camel-api/src/main/java/org/apache/camel/Exchange.java index c44b73c3964..3ba0e4b5edb 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Exchange.java +++ b/core/camel-api/src/main/java/org/apache/camel/Exchange.java @@ -100,6 +100,11 @@ public interface Exchange { String COOKIE_HANDLER = "CamelCookieHandler"; String CORRELATION_ID = "CamelCorrelationId"; +// The schema of the message payload +String CONTENT_SCHEMA = "CamelContentSchema"; +// The schema type of the message payload (json schema, avro, etc) +String CONTENT_SCHEMA_TYPE = "CamelContentSchemaType"; + String DATASET_INDEX = "CamelDataSetIndex"; String DEFAULT_CHARSET_PROPERTY = "org.apache.camel.default.charset"; String DESTINATION_OVERRIDE_URL = "CamelDestinationOverrideUrl"; @@ -398,7 +403,7 @@ public interface Exchange { /** * Removes the properties from this exchange that match the given pattern, except for the ones matching one * or more excludePatterns - * + * * @param pattern pattern of names that should be removed * @param excludePatterns one or more pattern of properties names that should be excluded (= preserved) * @return boolean whether any properties matched @@ -632,11 +637,11 @@ public interface Exchange { /** * Returns the endpoint which originated this message exchange if a consumer on an endpoint created the message * exchange, otherwise his property will be null. - * + * * Note: In case this message exchange has been cloned through another parent message exchange (which itself has * been created through the consumer of it's own endpoint), then if desired one could still retrieve the consumer * endpoint of such a parent message exchange as the following: - * + * * * getContext().getRoute(getFromRouteId()).getEndpoint() * @@ -646,7 +651,7 @@ public interface Exchange { /** * Returns the route id which originated this message exchange if a route consumer on an endpoint created the * message exchange, otherwise his property will be null. - * + * * Note: In case this message exchange has been cloned through another parent message exchange then this method * would return the fromRouteId property of that exchange. */
[camel] branch main updated: camel-jq: add an option to retrieve the payload to process from an exchange property
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 9f0b55d3c54 camel-jq: add an option to retrieve the payload to process from an exchange property 9f0b55d3c54 is described below commit 9f0b55d3c54816e7d13126c33ae2b5f8571d9c63 Author: Luca Burgazzoli AuthorDate: Fri Jun 17 14:06:17 2022 +0200 camel-jq: add an option to retrieve the payload to process from an exchange property --- .../resources/org/apache/camel/language/jq/jq.json | 2 +- .../org/apache/camel/language/jq/JqExpression.java | 65 - .../org/apache/camel/language/jq/JqLanguage.java | 11 ...a => JqExpressionFromHeaderOrPropertyTest.java} | 48 ++- .../language/jq/JqExpressionFromHeaderTest.java| 38 ...Test.java => JqExpressionFromPropertyTest.java} | 18 +++--- .../language/jq/JqExpressionHeaderFnTest.java | 8 +-- .../language/jq/JqExpressionPropertyFnTest.java| 6 +- .../camel/language/jq/JqExpressionSimpleTest.java | 7 +-- .../apache/camel/language/jq/JqTestSupport.java| 15 + .../camel/NoSuchHeaderOrPropertyException.java | 68 ++ .../org/apache/camel/model/language/jq.json| 2 +- .../org/apache/camel/builder/ExpressionClause.java | 47 +++ .../camel/builder/ExpressionClauseSupport.java | 52 ++--- .../apache/camel/model/language/JqExpression.java | 17 ++ .../reifier/language/JqExpressionReifier.java | 3 +- .../java/org/apache/camel/xml/in/ModelParser.java | 8 ++- 17 files changed, 328 insertions(+), 87 deletions(-) diff --git a/components/camel-jq/src/generated/resources/org/apache/camel/language/jq/jq.json b/components/camel-jq/src/generated/resources/org/apache/camel/language/jq/jq.json index 3051e61bbd6..a6d6bab62f2 100644 --- a/components/camel-jq/src/generated/resources/org/apache/camel/language/jq/jq.json +++ b/components/camel-jq/src/generated/resources/org/apache/camel/language/jq/jq.json @@ -18,7 +18,7 @@ "properties": { "expression": { "kind": "value", "displayName": "Expression", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax" }, "resultType": { "kind": "attribute", "displayName": "Result Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class of the result type (type from output)" }, -"headerName": { "kind": "attribute", "displayName": "Header Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of header to use as input, instead of the message body" }, +"headerName": { "kind": "attribute", "displayName": "Header Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of header to use as input, instead of the message body It has as higher precedent than the propertyName if both are set." }, "trim": { "kind": "attribute", "displayName": "Trim", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the value to remove leading and trailing whitespaces and line breaks" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" } } diff --
[camel] branch main updated: camel-jq: add a function to retrieve value from Exchange properties
This is an automated email from the ASF dual-hosted git repository. lburgazzoli 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 3096762b96a camel-jq: add a function to retrieve value from Exchange properties 3096762b96a is described below commit 3096762b96aee19841d83124bb95518f68d6a46c Author: Luca Burgazzoli AuthorDate: Thu Jun 16 19:46:23 2022 +0200 camel-jq: add a function to retrieve value from Exchange properties --- .../org/apache/camel/language/jq/JqExpression.java | 17 +++- .../org/apache/camel/language/jq/JqFunctions.java | 104 +++-- ...ava => JqExpressionFromHeaderAsStringTest.java} | 4 +- ...erTest.java => JqExpressionFromHeaderTest.java} | 28 +- ...erFnTest.java => JqExpressionHeaderFnTest.java} | 4 +- ...elloPojoTest.java => JqExpressionPojoTest.java} | 4 +- ...erTest.java => JqExpressionPropertyFnTest.java} | 16 ++-- ...qHelloTest.java => JqExpressionSimpleTest.java} | 4 +- .../apache/camel/language/jq/JqExpressionTest.java | 41 9 files changed, 193 insertions(+), 29 deletions(-) diff --git a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqExpression.java b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqExpression.java index d30343a3b00..9d72724 100644 --- a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqExpression.java +++ b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqExpression.java @@ -29,6 +29,8 @@ import net.thisptr.jackson.jq.Versions; import net.thisptr.jackson.jq.exception.JsonQueryException; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; +import org.apache.camel.InvalidPayloadException; +import org.apache.camel.NoSuchHeaderException; import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConverter; import org.apache.camel.spi.ExpressionResultTypeAware; @@ -162,10 +164,19 @@ public class JqExpression extends ExpressionAdapter implements ExpressionResultT JqFunctions.EXCHANGE_LOCAL.set(exchange); final List outputs = new ArrayList<>(1); +final JsonNode payload; -final JsonNode payload = headerName == null -? exchange.getMessage().getMandatoryBody(JsonNode.class) -: exchange.getMessage().getHeader(headerName, JsonNode.class); +if (headerName == null) { +payload = exchange.getMessage().getBody(JsonNode.class); +if (payload == null) { +throw new InvalidPayloadException(exchange, JsonNode.class); +} +} else { +payload = exchange.getMessage().getHeader(headerName, JsonNode.class); +if (payload == null) { +throw new NoSuchHeaderException(exchange, headerName, JsonNode.class); +} +} this.query.apply(scope, payload, outputs::add); diff --git a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqFunctions.java b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqFunctions.java index 1b6264a6f21..114d0312a84 100644 --- a/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqFunctions.java +++ b/components/camel-jq/src/main/java/org/apache/camel/language/jq/JqFunctions.java @@ -82,6 +82,32 @@ public final class JqFunctions { public static void loadLocal(Scope scope) { scope.addFunction(Header.NAME, 1, new Header()); scope.addFunction(Header.NAME, 2, new Header()); +scope.addFunction(Property.NAME, 1, new Property()); +scope.addFunction(Property.NAME, 2, new Property()); +} + +public abstract static class ExchangeAwareFunction implements Function { + +@Override +public void apply(Scope scope, List args, JsonNode in, Path path, PathOutput output, Version version) +throws JsonQueryException { + +Exchange exchange = EXCHANGE_LOCAL.get(); + +if (exchange != null) { +doApply(scope, args, in, path, output, version, exchange); +} +} + +protected abstract void doApply( +Scope scope, +List args, +JsonNode in, +Path path, +PathOutput output, +Version version, +Exchange exchange) +throws JsonQueryException; } /** @@ -98,30 +124,90 @@ public final class JqFunctions { * * */ -public static class Header implements Function { +public static class Header extends ExchangeAwareFunction { public static final String NAME = "header"; @Override -public void apply(Scope scope, List args, JsonNode in, Path path,
[camel-k-runtime] branch main updated (184c73d1 -> 591261c5)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git from 184c73d1 Updated CHANGELOG.md add 591261c5 build(deps): bump maven-common-artifact-filters from 3.2.0 to 3.3.0 No new revisions were added by this update. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[camel-k-runtime] branch main updated: build(deps): bump maven-enforcer-plugin from 3.0.0 to 3.1.0
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git The following commit(s) were added to refs/heads/main by this push: new b86247fc build(deps): bump maven-enforcer-plugin from 3.0.0 to 3.1.0 b86247fc is described below commit b86247fcd746ed957c64e1a784f8cd231fca36aa Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Fri Jun 10 19:02:44 2022 + build(deps): bump maven-enforcer-plugin from 3.0.0 to 3.1.0 Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0...enforcer-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- support/camel-k-runtime-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0d3af185..f2f5d0cb 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ 3.2.2 3.2.1 3.2.0 -3.0.0 +3.1.0 3.2.0 3.12.0 3.17.0 diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml index cb77f1e4..d6bdd7ab 100644 --- a/support/camel-k-runtime-bom/pom.xml +++ b/support/camel-k-runtime-bom/pom.xml @@ -37,7 +37,7 @@ 1652957044 -3.0.0 +3.1.0 3.6.3 2.8.0.Final