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 2021/12/08 10:09:31 UTC

[GitHub] [camel-k] astefanutti commented on a change in pull request #2821: fix: First bundle Kamelets install with client-side apply

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



##########
File path: pkg/install/kamelets.go
##########
@@ -125,14 +125,16 @@ func applyKamelet(ctx context.Context, c client.Client, path string, namespace s
 		err := serverSideApply(ctx, c, kamelet)
 		switch {
 		case err == nil:
-			break
+			return nil
 		case isIncompatibleServerError(err):
 			hasServerSideApply = false
 		default:
 			return fmt.Errorf("could not apply Kamelet from file %q: %w", path, err)
 		}
-	} else {
-		return clientSideApply(ctx, c, kamelet)
+	}
+	err = clientSideApply(ctx, c, kamelet)

Review comment:
       Ah, I've also changed the `err == nil` case for that reason, so that the switch branches all returns except the fallback to client-side apply.




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