pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Bug] Admin CLI - resource groups documentation is wrong

Open frankjkelly opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Version

Pulsar 2.10.3 Admin Client 3.1.0

Minimal reproduce step

./pulsar-3.1.0/bin/pulsar-admin --admin-url http://platform-pulsar-broker:8080 resourcegroups update options RG_healthking_wav --byte-publish-rate 262144

What did you expect to see?

Successful update

What did you see instead?

Need to provide just 1 parameter

Anything else?

As per https://pulsar.apache.org/reference/#/3.1.x/pulsar-admin/resourcegroups?id=update it looks like there should be an options parameter but that seems to be incorrect

This works (without the options)

./pulsar-3.1.0/bin/pulsar-admin --admin-url http://platform-pulsar-broker:8080 resourcegroups update RG_healthking_wav --byte-publish-rate 262144

I would be willing to submit a PR but I can't find the repo with the documentation.

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

frankjkelly avatar Jan 30 '24 17:01 frankjkelly

Ah, the repo is here https://github.com/apache/pulsar-site

Technoboy- avatar Jan 31 '24 02:01 Technoboy-

Thanks @Technoboy- since the documentation is generated automatically https://github.com/apache/pulsar-site/blob/main/contribute/document-contribution.md#update-command-line-tool-docs can you point me to the code that performs that generation? Thanks!

frankjkelly avatar Jan 31 '24 16:01 frankjkelly

options RG_healthking_wav are two parameters, so you see Need to provide just 1 parameter.

This is not friendly, so I'm improving the CLI experience by #22209, the following is new CLI log:

bin/pulsar-admin --admin-url http://platform-pulsar-broker:8080 resourcegroups update options RG_healthking_wav --byte-publish-rate 262144

Unmatched argument at index 5: 'RG_healthking_wav'
Usage: pulsar-admin resourcegroups update [-hv] [-bd=<dispatchRateInBytes>]
       [-bp=<publishRateInBytes>] [-md=<dispatchRateInMsgs>]
       [-mp=<publishRateInMsgs>] <resourceGroupName>
Updates a resourcegroup
      <resourceGroupName>   resourcegroup-name
      -bd, --byte-dispatch-rate=<dispatchRateInBytes>
                            byte-dispatch-rate
      -bp, --byte-publish-rate=<publishRateInBytes>
                            byte-publish-rate
  -h, --help                Show this help message and exit.
      -md, --msg-dispatch-rate=<dispatchRateInMsgs>
                            message-dispatch-rate
      -mp, --msg-publish-rate=<publishRateInMsgs>
                            message-publish-rate
  -v, --version             Print version information and exit.

nodece avatar Mar 14 '24 07:03 nodece