livepeer / livepeer/catalyst-api
InvertedBoolFlag options in cli are confusing and misleading
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
For [example](https://github.com/livepeer/catalyst-api/blob/1439bc0a663b8440805419eb6beb0e7243a81ec3/main.go#L97):
```
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at main.go line 97 and inspect InvertedBoolFlag and its other uses. Run livepeer-catalyst-api -h to compare each inverted option's name, default, and description; done means the help text matches the option's actual behavior for all affected flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100