You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/20 10:12:00 UTC

[GitHub] [camel] lburgazzoli opened a new pull request, #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

lburgazzoli opened a new pull request, #8593:
URL: https://github.com/apache/camel/pull/8593

   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   


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

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

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


[GitHub] [camel] lburgazzoli commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1286135918

   In test last run, the failure were:
   
   ```
   [ERROR] Failures: 
   [ERROR] org.apache.camel.management.ManagedAggregateControllerTest.testForceCompletionOfGroup
   [ERROR]   Run 1: ManagedAggregateControllerTest.testForceCompletionOfGroup:154 expected: <0> but was: <1>
   [ERROR]   Run 2: ManagedAggregateControllerTest.testForceCompletionOfGroup:154 expected: <0> but was: <1>
   [ERROR]   Run 3: ManagedAggregateControllerTest.testForceCompletionOfGroup:154 expected: <0> but was: <1>
   [INFO] 
   [WARNING] Flakes: 
   [WARNING] org.apache.camel.management.ManagedAggregateControllerTest.testForceCompletionOfAll
   [ERROR]   Run 1: ManagedAggregateControllerTest.testForceCompletionOfAll:94 expected: <0> but was: <1>
   [INFO]   Run 2: PASS
   ```


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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000435176


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   @jamesnetherton I amended only this test to include also components checks vs supervising controller, not sure if that's enough for the other cases



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

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

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


[GitHub] [camel] jamesnetherton commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000455117


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   It's probably ok. Would be nice to cover the non-supervised scenario if possible. I'll leave it up to you whether you want to do that.



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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000502820


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Pushed a new version, however the Kafka Consumer/Producer HealthCheck  are also dependant on on an impl `org.apache.camel.impl.health.AbstractHealthCheck`



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

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

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


[GitHub] [camel] davsclaus commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285403091

   It may be that some health checks in aws has been migrated as well, so updates are likely needed there too. This can be migrated in another PR


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

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

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


[GitHub] [camel] davsclaus commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000466015


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Yeah or add add a default method on the existing interface



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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285813558

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 4 | 4 | 3 | 2 |


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

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

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


[GitHub] [camel] davsclaus commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000531348


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   yeah the entire classes in camel-health should be moved to another package - as org.apache.camel.impl is for the core routing engine and camel itself.



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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1286097891

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 2 | 2 | 1 | 2 |


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

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

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


[GitHub] [camel] davsclaus commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000542002


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   The `impl` is also in camel-cluster / camel-cloud so its more general. Therefore in light of this then its okay in 3.x to import the impl - We can revisit this in 4.0



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

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

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


[GitHub] [camel] davsclaus commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000446779


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -52,7 +53,7 @@ public class KafkaConsumer extends DefaultConsumer
     protected ExecutorService executor;
     private final KafkaEndpoint endpoint;
     private KafkaConsumerHealthCheck consumerHealthCheck;
-    private KafkaHealthCheckRepository healthCheckRepository;
+    private ComponentsHealthCheckRepository healthCheckRepository;

Review Comment:
   Can you use HealthCheckRepository API instead to avoid impl import



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java:
##########
@@ -38,6 +38,7 @@
 import org.apache.camel.component.kafka.producer.support.PropagatedHeadersProvider;
 import org.apache.camel.component.kafka.serde.KafkaHeaderSerializer;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Same here as in the consumer



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Avoid importing impl classes as they should not be used in the public



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -123,8 +124,11 @@ protected void doStart() throws Exception {
         super.doStart();
 
         // health-check is optional so discover and resolve
-        healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(endpoint.getCamelContext(), "camel-kafka",
-                KafkaHealthCheckRepository.class);
+        healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(

Review Comment:
   Lookup the repository without impl import



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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000452796


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   this is because the ComponentsHealthCheckRepository has an add/remove health check methods: should we create a WritableHealthCheckRepository interface ? 



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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285546014

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 2 | 2 | 3 | 0 |


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

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

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


[GitHub] [camel] davsclaus commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1286464957

   LGTM to merge


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

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

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


[GitHub] [camel] jamesnetherton commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000461089


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   Might be enough to clone `CamelMicroProfileHealthConsumerTest` and modify it a bit.



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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000456077


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   Will do, do you have any preference about where this should be done ? 



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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285281348

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000502820


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Pushed a new version with an `WritableHealthCheckRepository` API.
   However I noticed that the Kafka Consumer/Producer HealthCheck  are also dependent on on an class from impl `org.apache.camel.impl.health.AbstractHealthCheck`



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

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

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


[GitHub] [camel] lburgazzoli commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285991621

   Can anyone help me understanding the test report ? 
   
   ```
   Logging test to /home/runner/work/camel/camel/automated-build-log/core.log
   Failed core test test: 1 verified / 1 failed
   There is no log file to copy at target/core-test.log
   Searching for modified components
   It will test the following 4 components:
   components/camel-aws
   components/camel-kafka
   components/camel-microprofile
   components/camel-platform-http-vertx
   ############################################################
   Testing component 1 of 4: components/camel-aws
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-aws.log
   Failed components/camel-aws test test: 1 verified / 2 failed
   There is no log file to copy at target/camel-aws-test.log
   ############################################################
   Testing component 2 of 4: components/camel-kafka
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-kafka.log
   components/camel-kafka test completed successfully: 2 verified / 2 failed
   Copying test log file at target/camel-kafka-test.log to the log directory
   ############################################################
   Testing component 3 of 4: components/camel-microprofile
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-microprofile.log
   components/camel-microprofile test completed successfully: 3 verified / 2 failed
   There is no log file to copy at target/camel-microprofile-test.log
   ############################################################
   Testing component 4 of 4: components/camel-platform-http-vertx
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-platform-http-vertx.log
   components/camel-platform-http-vertx test completed successfully: 4 verified / 2 failed
   There is no log file to copy at target/camel-platform-http-vertx-test.log
   ```
   
   I see that as example, there is a failure in the `camel-platform-http-vertx` tests but:
   1. the component should not be impacted by the PR
   2. the log file I have downloaded reports that all tests are ok


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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285464469

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 2 | 2 | 3 | 0 |


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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285942736

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 4 | 4 | 2 | 3 |


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

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

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


[GitHub] [camel] lburgazzoli commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285991698

   Can anyone help me understanding the test report ? 
   
   ```
   Logging test to /home/runner/work/camel/camel/automated-build-log/core.log
   Failed core test test: 1 verified / 1 failed
   There is no log file to copy at target/core-test.log
   Searching for modified components
   It will test the following 4 components:
   components/camel-aws
   components/camel-kafka
   components/camel-microprofile
   components/camel-platform-http-vertx
   ############################################################
   Testing component 1 of 4: components/camel-aws
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-aws.log
   Failed components/camel-aws test test: 1 verified / 2 failed
   There is no log file to copy at target/camel-aws-test.log
   ############################################################
   Testing component 2 of 4: components/camel-kafka
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-kafka.log
   components/camel-kafka test completed successfully: 2 verified / 2 failed
   Copying test log file at target/camel-kafka-test.log to the log directory
   ############################################################
   Testing component 3 of 4: components/camel-microprofile
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-microprofile.log
   components/camel-microprofile test completed successfully: 3 verified / 2 failed
   There is no log file to copy at target/camel-microprofile-test.log
   ############################################################
   Testing component 4 of 4: components/camel-platform-http-vertx
   ############################################################
   
   Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-platform-http-vertx.log
   components/camel-platform-http-vertx test completed successfully: 4 verified / 2 failed
   There is no log file to copy at target/camel-platform-http-vertx-test.log
   ```
   
   I see that as example, there is a failure in the `camel-platform-http-vertx` tests but:
   1. the component should not be impacted by the PR
   2. the log file I have downloaded reports that all tests are ok


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

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

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


[GitHub] [camel] lburgazzoli merged pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli merged PR #8593:
URL: https://github.com/apache/camel/pull/8593


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

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

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


[GitHub] [camel] lburgazzoli commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000503584


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   I ended up creating a new test as it impacted the current tests as they do assertion based on the number of checks



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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285335787

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 2 | 2 | 3 | 0 |


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

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

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


[GitHub] [camel] lburgazzoli commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285496342

   > It may be that some health checks in aws has been migrated as well, so updates are likely needed there too. This can be migrated in another PR
   
   ok, will follow up once this gets merged


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

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

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


[GitHub] [camel] davsclaus commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285652152

   Failed components/camel-microprofile test test: 2 verified / 3 failed


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

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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8593:
URL: https://github.com/apache/camel/pull/8593#issuecomment-1285930907

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 4 | 4 | 2 | 3 |


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

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

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