hernanDatgDev commented on code in PR #4987: URL: https://github.com/apache/camel-k/pull/4987#discussion_r1426805979
########## pkg/controller/integration/kits.go: ########## @@ -257,10 +259,27 @@ func matchesTrait(it map[string]interface{}, kt map[string]interface{}) bool { } func hasMatchingSources(it *v1.Integration, kit *v1.IntegrationKit) bool { - if len(it.Sources()) != len(kit.Spec.Sources) { + // A kit may have fewer sources during native builds but should not have more + if len(kit.Spec.Sources) > len(it.Sources()) { + return false + } + + isNativeBuild := false + if kit.Spec.Traits.Quarkus != nil { + // TODO: Verify proper way to determine mode + mode := kit.Spec.Traits.Quarkus.Modes[0] + isNativeBuild = mode == traitv1.NativeQuarkusMode + } + + catalog, err := camel.DefaultCatalog() Review Comment: This is great. I did mention to @gansheer that I had a concern about my use of this method so I'm glad I was thinking about it. I've already begun working on a helper to retrieve specific catalog versions (since I didn't find one already). Should have an update to this pr soon. -- 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