-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Search before asking
- I searched in the 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
$ 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
$ docker exec -it my_pulsar_standalone /bin/bash
I have no name!@79b75f3b4299:/$ cd /
I have no name!@79b75f3b4299:/$ find . -name *testfunc* 2>&1|grep -v "Permission denied"
I have no name!@79b75f3b4299:/$ #nothing found
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
- OR:
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!
Reactions are currently unavailable