This is an automated email from the ASF dual-hosted git repository.

cdeppisch 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 3bad28f6 fix: Disable noErrorHandler via user properties (#1186)
3bad28f6 is described below

commit 3bad28f64135bba95e3803c10517cad276e92237
Author: Christoph Deppisch <cdeppi...@redhat.com>
AuthorDate: Tue Mar 19 21:32:49 2024 +0100

    fix: Disable noErrorHandler via user properties (#1186)
    
    - Since Camel 4.4.0 the noErrorHandler default setting will disable the 
global Pipe error handler
    - Disable the noErrorHandler setting on the camel-kamelet component when 
the Pipe error handler ref is set
    - Relates to Camel K issue https://github.com/apache/camel-k/issues/5242
---
 .../org/apache/camel/k/quarkus/ApplicationConfigSourceProvider.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/camel-k-runtime/runtime/src/main/java/org/apache/camel/k/quarkus/ApplicationConfigSourceProvider.java
 
b/camel-k-runtime/runtime/src/main/java/org/apache/camel/k/quarkus/ApplicationConfigSourceProvider.java
index a6f6628e..8706ebea 100644
--- 
a/camel-k-runtime/runtime/src/main/java/org/apache/camel/k/quarkus/ApplicationConfigSourceProvider.java
+++ 
b/camel-k-runtime/runtime/src/main/java/org/apache/camel/k/quarkus/ApplicationConfigSourceProvider.java
@@ -37,6 +37,11 @@ public class ApplicationConfigSourceProvider implements 
ConfigSourceProvider {
         final Map<String, String> appProperties = 
RuntimeSupport.loadApplicationProperties();
         final Map<String, String> usrProperties = 
RuntimeSupport.loadUserProperties();
 
+        if (usrProperties.containsKey("camel.k.errorHandler.ref")) {
+            // Pipe error handler configured - need to disable noErrorHandler 
behavior in Camel 4.4.0
+            usrProperties.put("camel.component.kamelet.noErrorHandler", 
"false");
+        }
+
         return List.of(
             new PropertiesConfigSource(sysProperties, "camel-k-sys", 
ConfigSource.DEFAULT_ORDINAL + 1000),
             new PropertiesConfigSource(appProperties, "camel-k-app", 
ConfigSource.DEFAULT_ORDINAL),

Reply via email to