void-ptr974 opened a new pull request, #26177:
URL: https://github.com/apache/pulsar/pull/26177

   Fixes #26176
   
   ### Motivation
   
   The V5 `scalable-topics` CLI consumed the topic or namespace argument as a 
`-p` / `--property` value when `-p` was placed before the positional argument.
   
   Examples:
   
   ```bash
   pulsar-admin scalable-topics create -p app=cli topic://public/default/t1
   pulsar-admin scalable-topics list -p app=cli public/default
   ```
   
   ### Modifications
   
   - Make `-p` / `--property` consume one value per occurrence.
   - Keep repeated `-p key=value` support.
   - Support comma-separated properties, such as `-p key=value,key2=value2`.
   - Add CLI parser tests for `create` and `list`.
   
   After this change, both forms are accepted:
   
   ```bash
   pulsar-admin scalable-topics create -p app=cli -p mode=blackbox 
topic://public/default/t1
   pulsar-admin scalable-topics create -p app=cli,mode=blackbox 
topic://public/default/t1
   ```
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - `./gradlew --no-daemon :pulsar-client-tools:test --tests 
org.apache.pulsar.admin.cli.TestCmdScalableTopics`
   - `./gradlew --no-daemon :pulsar-client-tools:checkstyleMain 
:pulsar-client-tools:checkstyleTest`
   
   ### Does this pull request potentially affect one of the following parts:
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [x] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   


-- 
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]

Reply via email to