Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 17, 2022

Conversation

nicoloboschi
Copy link
Contributor

@nicoloboschi nicoloboschi commented Sep 14, 2022

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
Copy link
Contributor

@eolivelli eolivelli left a comment

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