pulsarctl
pulsarctl copied to clipboard
update a sink without tenant and namespace parameters will return a 404 error
Reproduce:
-
create a sink
pulsarctl sinks create --archive data-generator.nar --name package-upload-sink --inputs persistent://public/default/package-upload-connector-topic --custom-runtime-options '{"inputTypeClassName": "org.apache.pulsar.io.datagenerator.Person"}'
-
update the sink without tenant and namespace
❯ pulsarctl sinks update --archive data-generator.nar --name package-upload-sink --parallelism 2 [✖] code: 404 reason: 404 Not Found
The reason is that the update command of sink will not use the default tenant and namespace when they are not specified, and it will use endpoint /admin/v3/sinks/package-upload-sink
to get the sink, which returns a 404 error