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/12/17 19:10:02 UTC

[GitHub] [pulsar] flowchartsman opened a new issue, #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

flowchartsman opened a new issue, #18972:
URL: https://github.com/apache/pulsar/issues/18972

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   Similar to #18966, pulsar functions cannot be updated with a file uploaded using `pulsar-admin functions upload`.  In fact, `pulsar-admin functions upload` does not seem to do anything at all.
   
   ```
   $ pulsar-admin functions upload --path myfuncs/testfunc --source-file `pwd`/funcbin
   Uploaded successfully
   $ docker exec -it my_pulsar_standalone /bin/bash
   I have no name!@79b75f3b4299:/$ cd /
   I have no name!@79b75f3b4299:/$ find . -name *testfunc*
   find: './root': Permission denied
   find: './etc/ssl/private': Permission denied
   find: './proc/tty/driver': Permission denied
   find: './var/cache/ldconfig': Permission denied
   find: './var/cache/apt/archives/partial': Permission denied
   I have no name!@79b75f3b4299:/pulsar$ exit
   $ pulsar-admin functions create --go 'file:myfuncs/testfunc' --name test --inputs persistent://public/default/test
   2022-12-17T13:58:38,153-0500 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v3/functions/public/default/test] Failed to perform http post request: javax.ws.rs.BadRequestException: HTTP 400 Bad Request
   Encountered error "URI is not hierarchical" when getting Function package from file:myfuncs/testfunc
   
   Reason: Encountered error "URI is not hierarchical" when getting Function package from file:myfuncs/testfunc
   
   $ pulsar-admin functions create --go 'file:/myfuncs/testfunc' --name test --inputs persistent://public/default/test
   2022-12-17T14:03:48,028-0500 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v3/functions/public/default/test] Failed to perform http post request: javax.ws.rs.BadRequestException: HTTP 400 Bad Request
   Encountered error "file:/myfuncs/testfunc does not exists locally" when getting Function package from file:/myfuncs/testfunc
   
   Reason: Encountered error "file:/myfuncs/testfunc does not exists locally" when getting Function package from file:/myfuncs/testfunc
   $ pulsar-admin functions create --go 'file://myfuncs/testfunc' --name test --inputs persistent://public/default/test
   2022-12-17T13:58:55,985-0500 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v3/functions/public/default/test] Failed to perform http post request: javax.ws.rs.BadRequestException: HTTP 400 Bad Request
   Encountered error "URI has an authority component" when getting Function package from file://myfuncs/testfunc
   
   Reason: Encountered error "URI has an authority component" when getting Function package from file://myfuncs/testfunc
   ```
   
   ### Minimal reproduce step
   
   - build go function (perhaps python and java too, can't test)
   - `pulsar-admin functions upload --path myfuncs/testfunc --source-file <path to function binary>`
   - `pulsar-admin functions create --go 'file:myfuncs/testfunc' --name test --inputs persistent://public/default/test`
     - OR: `pulsar-admin functions create --go 'file:/myfuncs/testfunc' --name test --inputs persistent://public/default/test`
     - OR: `pulsar-admin functions create --go 'file://myfuncs/testfunc' --name test --inputs persistent://public/default/test`
   
   ### What did you expect to see?
   
   Created successfully
   
   ### What did you see instead?
   
   - `functions create --go 'file:myfuncs/testfunc`
     - `"URI is not hierarchical"`
   - `functions create --go 'file:/myfuncs/testfunc`
     - `"file:/myfuncs/testfunc does not exists locally"`
   - `functions create --go 'file://myfuncs/testfunc`
     - `"URI has an authority component"`  
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a 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.apache.org

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


[GitHub] [pulsar] flowchartsman commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by "flowchartsman (via GitHub)" <gi...@apache.org>.
flowchartsman commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1481685488

   2.10.3


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


[GitHub] [pulsar] jiangpengcheng commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by "jiangpengcheng (via GitHub)" <gi...@apache.org>.
jiangpengcheng commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1480477259

   which version of pulsar do you use, i'm using master branch(30d2469086fea989ac8baf059df8e69c66a68d89), and it works:
   
   ```
   ❯ ./bin/pulsar-admin functions upload --path function://public/default/myTestfunc2  --source-file exclamationFunc
   Uploaded successfully
   ```
   
   And one thing to clear is that although functions do have a version field, there are no "old" functions that need to be deleted; there will be only one function for the same name: "$tenant/$namespace/$name".
   
   There are old versions of a pulsar package, and you can delete them


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


[GitHub] [pulsar] github-actions[bot] commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1518918635

   The issue had no activity for 30 days, mark with Stale label.


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


[GitHub] [pulsar] jiangpengcheng commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by "jiangpengcheng (via GitHub)" <gi...@apache.org>.
jiangpengcheng commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1479121632

   I think the correct `--path` should be: `function://public/default/testfunc`?


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


[GitHub] [pulsar] github-actions[bot] commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by github-actions.
github-actions[bot] commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1399147122

   The issue had no activity for 30 days, mark with Stale label.


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


[GitHub] [pulsar] tisonkun commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by GitBox <gi...@apache.org>.
tisonkun commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1360833763

   cc @dlg99 since you recently touched function utilities. Do you have some insights here?


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


[GitHub] [pulsar] flowchartsman commented on issue #18972: [Bug] pulsar-admin functions upload does not appear to work at all.

Posted by "flowchartsman (via GitHub)" <gi...@apache.org>.
flowchartsman commented on issue #18972:
URL: https://github.com/apache/pulsar/issues/18972#issuecomment-1479770275

   ```
   $ pulsar-admin functions upload --path function://public/default/test --source-file `pwd`/funcbin
   HTTP 500 Internal Server Error
   
   Reason: HTTP 500 Internal Server Error
   ```
   
   In the logs:
   
   ```
   2023-03-22T14:49:59,388+0000 [pulsar-web-36-3] WARN  org.eclipse.jetty.server.HttpChannel - /admin/v3/functions/upload
   javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalArgumentException: Invalid path string "/pulsar/functions/function://public/default/test/<default>/ledgers" caused by empty node name spe
   cified @28
           at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:181) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[org.eclipse.jetty-jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[org.eclipse.jetty-jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[org.eclipse.jetty-jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
           at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty-netty-common-4.1.86.Final.jar:4.1.86.Final]
           at java.lang.Thread.run(Thread.java:829) ~[?:?]
   Caused by: javax.servlet.ServletException: java.lang.IllegalArgumentException: Invalid path string "/pulsar/functions/function://public/default/test/<default>/ledgers" caused by empty node name specified @28
           at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410) ~[org.glassfish.jersey.containers-jersey-container-servlet-core-2.34.jar:?]
           at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) ~[org.glassfish.jersey.containers-jersey-container-servlet-core-2.34.jar:?]
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:366) ~[org.glassfish.jersey.containers-jersey-container-servlet-core-2.34.jar:?]
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:319) ~[org.glassfish.jersey.containers-jersey-container-servlet-core-2.34.jar:?]
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) ~[org.glassfish.jersey.containers-jersey-container-servlet-core-2.34.jar:?]
           at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.apache.pulsar.broker.web.ResponseHandlerFilter.doFilter(ResponseHandlerFilter.java:67) ~[org.apache.pulsar-pulsar-broker-2.10.3.jar:2.10.3]
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622]
           ... 19 more
   
   ```
   
   So it looks like it should actually be:
   
   ```
   pulsar-admin functions upload --path public/default/test --source-file `pwd`/funcbin
   ```
   
   This appears to work, so now I need to test deploying it.  Of course, it's still not clear how to delete old versions of the function or list them, but this appears to be progress on using `functions upload` at least...
   


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