You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/24 14:03:10 UTC
[GitHub] [pulsar] nicoloboschi opened a new pull request, #18608: [improve][cli] Pulsar shell: allow cloning an existing config
nicoloboschi opened a new pull request, #18608:
URL: https://github.com/apache/pulsar/pull/18608
Fixes #18175
### Motivation
To simplify adding a new config, it might be useful to clone an existing one and then update the needed fields with `set-property` cmd
### Modifications
* Added `config clone <copyfrom> --name <newconfig>` command
* Also fixed autocomplete in config create to not autocomplete with existing names
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18608:
URL: https://github.com/apache/pulsar/pull/18608#issuecomment-1326669506
# [Codecov](https://codecov.io/gh/apache/pulsar/pull/18608?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#18608](https://codecov.io/gh/apache/pulsar/pull/18608?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aa799b0) into [master](https://codecov.io/gh/apache/pulsar/commit/598ca5dacd073e00367e320a1c98f8648eadcb18?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (598ca5d) will **decrease** coverage by `10.63%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/pulsar/pull/18608?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #18608 +/- ##
=============================================
- Coverage 47.72% 37.08% -10.64%
+ Complexity 9330 1968 -7362
=============================================
Files 618 209 -409
Lines 58568 14420 -44148
Branches 6093 1573 -4520
=============================================
- Hits 27951 5348 -22603
+ Misses 27589 8486 -19103
+ Partials 3028 586 -2442
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `37.08% <ø> (-10.64%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/18608?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../org/apache/pulsar/client/impl/ConnectionPool.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0Nvbm5lY3Rpb25Qb29sLmphdmE=) | `37.43% <0.00%> (-1.03%)` | :arrow_down: |
| [...a/org/apache/pulsar/client/impl/TableViewImpl.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0ltcGwuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...pache/pulsar/client/impl/TableViewBuilderImpl.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0J1aWxkZXJJbXBsLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ce/ConsistentHashingStickyKeyConsumerSelector.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL0NvbnNpc3RlbnRIYXNoaW5nU3RpY2t5S2V5Q29uc3VtZXJTZWxlY3Rvci5qYXZh) | | |
| [...sar/broker/service/plugin/EntryFilterProvider.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BsdWdpbi9FbnRyeUZpbHRlclByb3ZpZGVyLmphdmE=) | | |
| [.../java/org/apache/pulsar/broker/web/WebService.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvV2ViU2VydmljZS5qYXZh) | | |
| [...ar/common/naming/PartitionedManagedLedgerInfo.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi9uYW1pbmcvUGFydGl0aW9uZWRNYW5hZ2VkTGVkZ2VySW5mby5qYXZh) | | |
| [...r/broker/service/schema/SchemaRegistryService.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3NjaGVtYS9TY2hlbWFSZWdpc3RyeVNlcnZpY2UuamF2YQ==) | | |
| [.../broker/intercept/BrokerInterceptorDefinition.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9pbnRlcmNlcHQvQnJva2VySW50ZXJjZXB0b3JEZWZpbml0aW9uLmphdmE=) | | |
| [...java/org/apache/pulsar/broker/rest/TopicsBase.java](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9yZXN0L1RvcGljc0Jhc2UuamF2YQ==) | | |
| ... and [407 more](https://codecov.io/gh/apache/pulsar/pull/18608/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #18608:
URL: https://github.com/apache/pulsar/pull/18608#discussion_r1031676604
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/shell/ConfigShell.java:
##########
@@ -256,6 +257,9 @@ public boolean run() {
@Parameters(commandDescription = "Create a new configuration.")
private class CmdConfigCreate extends CmdConfigPut {
+ @Parameter(description = "Configuration name", required = true)
+ protected String name;
Review Comment:
Is this somewhat of a breaking change since we already release Pulsar Shell in 2.11.0?
That is, previously, users could create config without specifying a name.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tisonkun commented on a diff in pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #18608:
URL: https://github.com/apache/pulsar/pull/18608#discussion_r1031682681
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/shell/ConfigShell.java:
##########
@@ -256,6 +257,9 @@ public boolean run() {
@Parameters(commandDescription = "Create a new configuration.")
private class CmdConfigCreate extends CmdConfigPut {
+ @Parameter(description = "Configuration name", required = true)
+ protected String name;
Review Comment:
Thanks for your explanation! Clone the code and confirm.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nicoloboschi merged pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
nicoloboschi merged PR #18608:
URL: https://github.com/apache/pulsar/pull/18608
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nicoloboschi commented on a diff in pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on code in PR #18608:
URL: https://github.com/apache/pulsar/pull/18608#discussion_r1031677671
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/shell/ConfigShell.java:
##########
@@ -256,6 +257,9 @@ public boolean run() {
@Parameters(commandDescription = "Create a new configuration.")
private class CmdConfigCreate extends CmdConfigPut {
+ @Parameter(description = "Configuration name", required = true)
+ protected String name;
Review Comment:
if you look closely I just moved it in the child class because the create and update commands must have different autocompletion. at "runtime" it's the same and the syntax isn't changed
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nicoloboschi closed pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
Posted by GitBox <gi...@apache.org>.
nicoloboschi closed pull request #18608: [improve][cli] Pulsar shell: allow cloning an existing config
URL: https://github.com/apache/pulsar/pull/18608
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org