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

feat(merod): implement generic config edit #962

Merged
merged 4 commits into from
Nov 12, 2024
Merged

Conversation

fbozic
Copy link
Member

@fbozic fbozic commented Nov 11, 2024

Implement a more generic config edit solution. Interface similar to docker build-arg pattern.
Examples of string, number, and bool args:

cargo run -p merod -- --node-name node1 config \
  --arg=context.config.new.contract_id='"myamestrov.testnet"' \
  --arg=sync.timeout_ms=20000 \
  --arg=discovery.mdns=false

@fbozic fbozic self-assigned this Nov 11, 2024
@fbozic fbozic requested review from frdomovic, petarjuki7 and miraclx and removed request for frdomovic November 11, 2024 19:20
@fbozic fbozic merged commit 57b43a4 into master Nov 12, 2024
15 checks passed
@fbozic fbozic deleted the feat/merod-config-generic branch November 12, 2024 09:32
#[command(flatten)]
pub mdns: Option<MdnsArgs>,
/// Key-value pairs to be added or updated in the TOML file
#[clap(short, long, value_parser = value_parser!(KeyValuePair))]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#[clap(short, long, value_parser = value_parser!(KeyValuePair))]

You should be able to skip value_parser as T: FromStr is implied. Also, can we skip the --arg flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants