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/10/10 11:09:51 UTC

[GitHub] [camel-k] essobedo opened a new pull request, #3731: feat(cli): Make add-repo and remove-repo compatible with a global operator

essobedo opened a new pull request, #3731:
URL: https://github.com/apache/camel-k/pull/3731

   fixes #3667 
   
   ## Motivation
   
   The subcommand `add-repo` is not compatible with a global operator as it is now, it should be reviewed to propose a way to use it in case a global operator is used.
   
   ## Modifications:
   
   * Add the subcommand `remove-repo` to be able to remove a repository in order to be able to clean up the Integration Platform used for the e2e test
   * Update the active primary IntegrationPlaform of the namespace when the operator id is not set 
   
   
   **Release Note**
   ```release-note
   feat(cli): Make add-repo and remove-repo compatible with a global operator
   ```
   


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


[GitHub] [camel-k] tadayosi commented on a diff in pull request #3731: feat(cli): Make add-repo and remove-repo compatible with a global operator

Posted by GitBox <gi...@apache.org>.
tadayosi commented on code in PR #3731:
URL: https://github.com/apache/camel-k/pull/3731#discussion_r991793512


##########
e2e/global/common/kamelet_test.go:
##########
@@ -62,21 +59,39 @@ func TestKameletClasspathLoading(t *testing.T) {
 			Eventually(IntegrationPodPhase(ns, "timer-kamelet-integration"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 
 			Eventually(IntegrationLogs(ns, "timer-kamelet-integration")).Should(ContainSubstring("important message"))
-
-			// Cleanup
-			Expect(Kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
 		})
 
 		// Custom repo
 		t.Run("test custom Kamelet repository", func(t *testing.T) {
-
+			globalTest := os.Getenv("CAMEL_K_FORCE_GLOBAL_TEST") == "true"

Review Comment:
   I don't think it's good idea. If we know it doesn't run with a global operator then we should move it to `e2e/namespace`, where each operator is certainly installed per test. Probably `e2e/namespace/intall/cli` is the best place to move it.



##########
e2e/global/common/kamelet_test.go:
##########
@@ -37,9 +37,6 @@ import (
  * See https://github.com/apache/camel-k/issues/3667 for details
  */
 func TestKameletClasspathLoading(t *testing.T) {
-	if os.Getenv("CAMEL_K_TEST_SKIP_PROBLEMATIC") == "true" {

Review Comment:
   Let's also remove the above comment as well.



##########
pkg/cmd/kamelet_add_repo.go:
##########
@@ -49,23 +52,24 @@ func newKameletAddRepoCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, *kame
 		},
 	}
 
-	cmd.Flags().StringP("operator-id", "x", "camel-k", "Id of the Operator to update.")
+	cmd.Flags().StringP("operator-id", "x", "", "Id of the Operator to update. If not set, the active primary Integration Platform is updated.")

Review Comment:
   I'm a bit concerned that the way the flag is used is not consistent with `kamel run` and other commands.
   @squakez Do you think it's ok?



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


[GitHub] [camel-k] squakez commented on a diff in pull request #3731: feat(cli): Make add-repo and remove-repo compatible with a global operator

Posted by GitBox <gi...@apache.org>.
squakez commented on code in PR #3731:
URL: https://github.com/apache/camel-k/pull/3731#discussion_r991910836


##########
pkg/cmd/kamelet_add_repo.go:
##########
@@ -49,23 +52,24 @@ func newKameletAddRepoCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, *kame
 		},
 	}
 
-	cmd.Flags().StringP("operator-id", "x", "camel-k", "Id of the Operator to update.")
+	cmd.Flags().StringP("operator-id", "x", "", "Id of the Operator to update. If not set, the active primary Integration Platform is updated.")

Review Comment:
   If it's documented, I guess it's okey.



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


[GitHub] [camel-k] tadayosi merged pull request #3731: feat(cli): Make add-repo and remove-repo compatible with a global operator

Posted by GitBox <gi...@apache.org>.
tadayosi merged PR #3731:
URL: https://github.com/apache/camel-k/pull/3731


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


[GitHub] [camel-k] tadayosi commented on a diff in pull request #3731: feat(cli): Make add-repo and remove-repo compatible with a global operator

Posted by GitBox <gi...@apache.org>.
tadayosi commented on code in PR #3731:
URL: https://github.com/apache/camel-k/pull/3731#discussion_r991941179


##########
pkg/cmd/kamelet_add_repo.go:
##########
@@ -49,23 +52,24 @@ func newKameletAddRepoCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, *kame
 		},
 	}
 
-	cmd.Flags().StringP("operator-id", "x", "camel-k", "Id of the Operator to update.")
+	cmd.Flags().StringP("operator-id", "x", "", "Id of the Operator to update. If not set, the active primary Integration Platform is updated.")

Review Comment:
   OK, then let's accept it as is.



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