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

InvertedBoolFlag options in cli are confusing and misleading #790

Open
joegraviton opened this issue Aug 2, 2023 · 1 comment
Open

InvertedBoolFlag options in cli are confusing and misleading #790

joegraviton opened this issue Aug 2, 2023 · 1 comment

Comments

@joegraviton
Copy link

For example:

config.InvertedBoolFlag(fs, &cli.MistTriggerSetup, "mist-trigger-setup", true, "Overwrite Mist triggers with the ones built into catalyst-api")

This means, by default, mist-trigger-setup is true, and it will "Overwrite Mist triggers with the ones built into catalyst-api". No issue so far.

However, in cli help:

livepeer-catalyst-api -h
...
  -no-mist
    	Disable all Mist integrations. Should only be used for development and CI (default true)
  -no-mist-scrape-metrics
    	Scrape statistics from MistServer and publish to RabbitMQ (default true)
  -no-mist-trigger-setup
    	Overwrite Mist triggers with the ones built into catalyst-api (default true)
...

The option name is inverted to -no-mist-trigger-setup, but it still shows the default value true and help msg for mist-trigger-setup, which are opposite in logic.

The issue also apply to other InvertedBoolFlag options, as you can see above.

@thomshutt
Copy link
Contributor

@joegraviton agreed, this is pretty confusing. Are you able to submit a PR to make this make more sense?

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

No branches or pull requests

2 participants