[Bug] pulsar-admin functions update does not update the function binary from a local file
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
Similar to #18966 and #18972, pulsar-admin seems unable to correctly update a running function from a local file, despite seeming to succeed. In fact, it seems as if it is impossible to update running pulsar function code in any way whatsoever.
```
$ go build -o funcbin
$ sha256sum funcbin
bfb2284411e0bdb893a91d93addb88b9e61c4b3d04f17dae94b57db6a1e1dc2d funcbin
$ pulsar-admin functions download --fqfn public/default/running_function --destination-file `pwd`/current_func
Downloaded successfully
$ sha256sum current_func
074f137112ff7d7050c6a10cabcb94276f3066b87ca55ebc7e6699e7e92ad02b current_func
$ pulsar-admin functions update --go `pwd`/funcbin --fqfn public/default/running_function
Updated successfully
$pulsar-admin functions download --fqfn public/default/running_function --destination-file `pwd`/updated_func
Downloaded successfully
sha256sum updated_func
074f137112ff7d7050c6a10cabcb94276f3066b87ca55ebc7e6699e7e92ad02b updated_func
```
### Minimal reproduce step
(see above)
### What did you expect to see?
Function is actually updated.
### What did you see instead?
Update appears to succeed. Nothing is actually done.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Reproduce the issue with the listed `pulsar-admin functions update` and `functions download` commands using the local `funcbin`, then compare the SHA-256 hashes. Trace the functions update and download entry points to determine why the downloaded binary remains unchanged. Done means a local-file update is reflected in the subsequently downloaded function binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, java
- Domain
- cli, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100