jiangpengcheng commented on issue #19721: URL: https://github.com/apache/pulsar/issues/19721#issuecomment-1480473281
@flowchartsman I haven't tested with non-standalone mode, but it should have the same behavior The are two workflows, I think: ### Use file path for `--py|--go|--jar`, and set `functionsWorkerEnablePackageManagement` to true in `conf/broker.conf` 1. create a function with `--py|--go|--jar`, followed by a file path, when `functionsWorkerEnablePackageManagement` in `conf/broker.conf` is true(which is defaulted to true in standalone mode, while default to false in non-standalone mode), this file will be automatically uploaded as a pulsar package, and the pkg url looks like `function://public/default/myFunc@0` 2. if the function code should be updated, you can update this function with `--py|--go|--jar` specified to the new code file, and then pulsar will automatically upload the file to a new package path: `function://public/default/myFunc@1` 3. you can list all versions of packages using `pulsar-admin packages list public/default/myFunc --type function`, it will list all versions of automatically uploaded packages 4. then you can delete old version packages as your wish ### Use package path for `--py|--go|--jar` 1. manually upload a pulsar package: `pulsar-admin packages upload function://public/default/myPkg@0 --path /your/code/path --description "my func"` 2. create a function with the uploaded package: `--go function://public/default/myPkg@0` 3. if you want to change the code, manually upload a new pulsar package: `pulsar-admin packages upload function://public/default/myPkg@1 --path /your/code/path --description "my func v1"` 4. update function with `--go function://public/default/myPkg@1` 5. you can list all packages with: `pulsar-admin packages list public/default/myPkg --type function` 6. then delete pkg versions as your wish -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
