Repository navigation
Closed
Description
Search before asking
- I searched in the issues and found nothing similar.
Version
Pulsar v2.10.2
Minimal reproduce step
- Enable package service
- build a go function (maybe works with python or java too, don't know)
pulsar-admin packages upload function://public/default/[email protected] --path /full/path/to/function_binary --description "my function"
The package 'function://public/default/[email protected]' uploaded from path '/full/path/to/function_binary' successfully
pulsar-admin functions create --tenant public --namespace default --name myfunc --go "function://public/default/[email protected]" --inputs persistent://public/default/test
Created successfully
pulsar-admin packages upload function://public/default/[email protected] --path /full/path/to/function_binary_v2 --description "my function, but newer"
The package 'function://public/default/[email protected]' uploaded from path '/full/path/to/function_binary_v2' successfully
pulsar-admin functions update --go "function://public/default/[email protected]" --tenant public --namespace default --name myfunc
null
Reason: java.lang.IllegalArgumentException: File is not a normal file /Users/me/pulsar/function:/public/default/[email protected]
What did you expect to see?
Updated successfully
What did you see instead?
Reason: java.lang.IllegalArgumentException: File is not a normal file /Users/me/pulsar/function:/public/default/[email protected]
Anything else?
Unlike functions create, functions update does not seem to understand package URLs, and attempts to access a local file. Since packages have built in versioning, it only makes sense that you would be able to create a new package version and update the function to use it. This would be emanently useful for testing and/or staging upgrades to running functions, so it feels like it should work, however documentation on the subject is kind of hazy. In any case, it should be supported if it's not.
Are you willing to submit a PR?
- I'm willing to submit a PR!
Activity
flowchartsman commentedon Dec 17, 2022
Deleting and re-creating the function with
function createmight work under certain circumstances, but if you have your function set to clean up subscriptions when it is deleted, then this would essentially wipe its cursor and create a new one at "earliest/latest" depending, and my functions are set up in this way, so the workaround won't work for me, sadly.flowchartsman commentedon Dec 17, 2022
It's worth noting that the docs for
pulsar-admin functions updateexplicitly say you can do this withfunctionandfileurls:filedoes not work either.github-actions commentedon Jan 17, 2023
The issue had no activity for 30 days, mark with Stale label.