Skip to content

[improve][cli] Pulsar shell: add command to set/get property of a config - #17651

Merged
nicoloboschi merged 4 commits into
apache:masterfrom
nicoloboschi:pulsar-shell-update-property
Sep 17, 2022
Merged

nicoloboschi merged 4 commits into
apache:masterfrom
nicoloboschi:pulsar-shell-update-property

Conversation

@nicoloboschi

@nicoloboschi nicoloboschi commented Sep 14, 2022 •

Copy link
Copy Markdown
Contributor

Motivation

In Pulsar shell you can only update the whole configuration but you can't modify it later. For instance, if I import a new config and then I want to enable a feature or a property, I need to read the config, copy, modify and update.
My use-case is that I want to enable custom commands in a quick way.

Modifications

  • Added new command config set-property -p <prop> -v <value> <config>
    It updates or creates a new entry in the config. If you modify the current config, the shell will reload applying the new config.
  • Added new command config get-property -p <prop> <config>
    Returns the current value for the property of the config

For example, now I can enable a cli extensions directly from the shell:

config use my-config
config set-property -p customCommandsFactories -v <extensionname> my-config
  • doc

@github-actions github-actions Bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Sep 14, 2022
@nicoloboschi nicoloboschi changed the title [improve][cli] Pulsar shell: add command to update property of a config [improve][cli] Pulsar shell: add command to set/get property of a config Sep 15, 2022

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicoloboschi
nicoloboschi merged commit 4ec1009 into apache:master Sep 17, 2022
@nicoloboschi
nicoloboschi deleted the pulsar-shell-update-property branch September 17, 2022 09:28
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Sep 19, 2022
nicoloboschi added a commit that referenced this pull request Nov 28, 2022
@nicoloboschi nicoloboschi added this to the 2.11.0 milestone Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants