Error message is misleading if there are more entries in the clients group than clients
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 32
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
In the following code, the difference of the clients in the group vs the clients themselves is using .abs.
In the case where the clients group has 1 or more clients that no longer exist, then the message show is misleading.
There are 2 missing clients in PROD_ORG's client group file /path/organizations/PROD_ORG/groups/client.json. If this is not intentional do NOT proceed with a restore until corrected.
knife tidy backup cleanwill auto-correct this. https://github.com/chef-customers/knife-tidy
When in fact it should say something like
There are 2 clients in clients in PROD_ORG's client group file /path/organizations/PROD_ORG/groups/client.json that no longer exist.
The way this could happen is if some clients were deleted during the knife-ec-backup, after the client group data was exported but before the client data was exported.
Contributor guide
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 lib/chef/knife/ec_base.rb#L261 and trace the client-group count comparison for a group containing clients that no longer exist. Reproduce the backup case described in the issue and update the error wording so it identifies clients present in the group but absent from the exported client data; the issue is done when this scenario no longer produces the misleading missing-clients message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100