You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/03/15 10:27:18 UTC

[GitHub] [camel-k] astefanutti commented on a change in pull request #3078: Migrates opm to file based indexes and fixes e2e upgrade tests

astefanutti commented on a change in pull request #3078:
URL: https://github.com/apache/camel-k/pull/3078#discussion_r826808468



##########
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) {
 			return nil, err
 		}
 	}
 
+	//
+	// kit can still be nil if integration kit is yet

Review comment:
       The kit is assigned before the build starts.

##########
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:
       Could that be a race between the moment the kit is assigned to the Integration and the cached client is refreshed?
   
   It's an invariant of the system that when the Integration is assigned a kit, the kit exists.




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