christophd commented on code in PR #5245: URL: https://github.com/apache/camel-k/pull/5245#discussion_r1522782774
########## pkg/controller/pipe/integration.go: ########## @@ -210,6 +218,27 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1.Pipe return &it, nil } +// shouldHandleNoErrorHandler determines the runtime version and checks on noErrorHandler that is configured for this version. +func shouldHandleNoErrorHandler(ctx context.Context, c client.Client, it *v1.Integration) bool { + var runtimeVersion string + if it.Spec.Traits.Camel != nil && it.Spec.Traits.Camel.RuntimeVersion != "" { + runtimeVersion = it.Spec.Traits.Camel.RuntimeVersion + } else if pl, err := platform.GetForResource(ctx, c, it); err == nil && pl != nil { + runtimeVersion = pl.Status.Build.RuntimeVersion + } + + if runtimeVersion != "" { + runtimeVersion, _ = strings.CutSuffix(runtimeVersion, "-SNAPSHOT") + if versionNumber, err := strconv.Atoi(strings.ReplaceAll(runtimeVersion, ".", "")); err == nil { Review Comment: Should be handled by the string base comparison - will add a unit test ... -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org