You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/19 11:25:03 UTC

[GitHub] [pulsar] cbornet commented on a diff in pull request #15671: Allow creating builtin functions in pulsar-admin CLI

cbornet commented on code in PR #15671:
URL: https://github.com/apache/pulsar/pull/15671#discussion_r876937369


##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -424,6 +425,27 @@ public void testCreateFunctionWithInvalidPackageUrl() throws Exception {
         verify(functions, times(0)).createFunctionWithUrl(any(FunctionConfig.class), anyString());
     }
 
+    @Test
+    public void testCreateFunctionWithBuiltinNar() throws Exception {
+        cmd.run(new String[] {
+                "create",
+                "--name", FN_NAME,
+                "--inputs", INPUT_TOPIC_NAME,
+                "--output", OUTPUT_TOPIC_NAME,
+                "--jar", BUILTIN_NAR,

Review Comment:
   > this is not how builtin sources and sinks work.
   with Sinks and Sources you use "--sink-type" to refer to a builtin Sink. This way we are not depending on the name of the jar file
   
   For Sinks/Source you can also give `--archive builtin://mysink`.
   It would be useful to have a `--function-type` param but that I think it should be another PR



-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org