camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Health trait: Inconsistent Integration condition ready status

Open christophd opened this issue 1 year ago • 3 comments
trafficstars

What happened?

The E2E test TestHealthTrait (health_test.go) reveals a flaw that we have for quite some time regarding the Integration condition ready status.

An integration with heath trait enabled becomes ready for a short period of time regardless of the health evaluation. This is because before the health trait may evaluate the integration ready status the Deployment ready state has already reported the ready condition to be true.

This leads to the situation that a non ready integration (according to the health trait) becomes ready for a short amount of time just after the deployment has become ready.

We should make sure to have a consistent ready condition status on the integration resource. When health trait is enabled this should be the source of truth for the ready condition.

Steps to reproduce

  1. Start an integration that never becomes ready according to the health trait (like E2E TestHealthTrait does)
  2. Check for the integration condition status to never become ready
  3. Make sure to only report ready status based on the health trait evaluation

Relevant log output

No response

Camel K version

2.3.0

christophd avatar Apr 10 '24 17:04 christophd

I think @rinaldodev had to deal with this for some time. I don't recall if something has been fixed on camel side.

lburgazzoli avatar Apr 24 '24 07:04 lburgazzoli

I think @rinaldodev had to deal with this for some time. I don't recall if something has been fixed on camel side.

Thanks. Here is the context:

https://github.com/apache/camel-k/issues/4922

https://issues.apache.org/jira/plugins/servlet/mobile#issue/CAMEL-20242

rinaldodev avatar Apr 24 '24 11:04 rinaldodev

The original Camel problem was fixed. However, it required some runtime properties to make it work, so, in order to fix the flaky test we should instead add those properties. We may use this as a workaround and wait for the framework to fix https://issues.apache.org/jira/browse/CAMEL-20244 definitively.

squakez avatar Apr 30 '24 15:04 squakez