phantomjinx commented on a change in pull request #3078: URL: https://github.com/apache/camel-k/pull/3078#discussion_r826841777
########## File path: pkg/trait/trait.go ########## @@ -79,11 +79,15 @@ func newEnvironment(ctx context.Context, c client.Client, integration *v1.Integr if kit == nil { kit, err = getIntegrationKit(ctx, c, integration) - if err != nil { + if err != nil && !k8serrors.IsNotFound(err) { Review comment: No. The error was quite subtle. During an upgrade the, kit has to be rebuilt and at that point, the `integration.status.integrationkit` is assigned an [empty/blank integrationkit](https://github.com/apache/camel-k/blob/main/pkg/controller/integration/build_kit.go#L76). However, the tests assume a check for a nil intergationkit on `integration.status` not an empty one. The result is that the error [L83](https://github.com/apache/camel-k/blob/main/pkg/trait/trait.go#L83) is returned, reported in the operator log and the process repeated ad infinitum, even when the integrationkit has been rebuilt and now available to be reassinged to `integration.status.integrationkit`. What the user sees in an integrationkit fully rebuilt but an integration stuck in the `Building Kit` phase. -- 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