You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "squakez (via GitHub)" <gi...@apache.org> on 2024/01/24 12:40:41 UTC

[PR] feat(trait): enable health trait by default [camel-k]

squakez opened a new pull request, #5096:
URL: https://github.com/apache/camel-k/pull/5096

   Closes #5024
   
   <!-- Description -->
   
   
   
   
   <!--
   Enter your extended release note in the below block. If the PR requires
   additional action from users switching to the new release, include the string
   "action required". If no release note is required, write "NONE". 
   
   You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
   the text is added to the right section of the release notes. 
   -->
   
   **Release Note**
   ```release-note
   feat(trait): enable health trait by default
   ```
   


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#issuecomment-1910052810

   :heavy_check_mark: Unit test coverage report - coverage increased from 34.8% to 35.4% (**+0.6%**)


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#issuecomment-2092632159

   :heavy_check_mark: Unit test coverage report - coverage increased from 38% to 38.1% (**+0.1%**)


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez merged PR #5096:
URL: https://github.com/apache/camel-k/pull/5096


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#issuecomment-1908409623

   :heavy_check_mark: Unit test coverage report - coverage increased from 34.8% to 35.4% (**+0.6%**)


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on code in PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#discussion_r1503894313


##########
pkg/trait/health.go:
##########
@@ -57,7 +57,13 @@ func (t *healthTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		!e.IntegrationInPhase(v1.IntegrationPhaseInitialization) && !e.IntegrationInRunningPhases() {
 		return false, nil, nil
 	}
-	if !pointer.BoolDeref(t.Enabled, false) {
+	// The trait must be disabled if it's a user based build (for which we do not control the way to handle Health checks)
+	if ct := e.Catalog.GetTrait(containerTraitID); ct != nil {
+		if ct, ok := ct.(*containerTrait); ok && ct.hasUserProvidedImage() {
+			return false, newIntegrationConditionPlatformDisabledWithMessage("container image was not built via Camel K operator"), nil

Review Comment:
   so what happen for a user provided image ? can't we enable health checks if the user explicitly enable them ?



-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#issuecomment-1908132193

   Nice work.
   
   Just missing some documentation update:
   https://github.com/apache/camel-k/blob/7eed52ab3919cdb7537eb503b19ae7dd2f8e90dc/pkg/apis/camel/v1/trait/health.go#L22


-- 
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


Re: [PR] feat(trait): enable health trait by default [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5096:
URL: https://github.com/apache/camel-k/pull/5096#issuecomment-2085452822

   :heavy_check_mark: Unit test coverage report - coverage increased from 38% to 38.1% (**+0.1%**)


-- 
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