influxdata / influxdata/influx-cli
Misleading description of the --force switch (apply) and/or unexpected behavior
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
From the source code:
Set to 'true' to skip confirmation before applying changes. Set to 'conflict' to skip confirmation and overwrite existing resources
The way it works now...
Set to 'true' to skip confirmation to apply changes (if interactive). Set to 'conflict' to overwrite resources in case of a conflict
And if you specify --force conflict, you probably also want --force true, because... like, "ask me to apply changes, but overwrite if need be." Does it makes sense?
And in the previous repository it was !isForced && b.applyOpts.force != "conflict", but the tty logic was weird.
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 with cmd/influx/apply.go around line 148 and clients/apply/apply.go around lines 132-136, then compare the earlier logic in the linked template.go section. Trace how --force true and --force conflict interact with confirmation and conflict handling. Done means the documented behavior and actual behavior agree, with the intended interaction made explicit.
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