Improve error message when cookbook is not in policy file set
Open
Nobody has claimed this yet.
Status: Waiting on Contributor
Triage: Needs Information
- Dominant language
- Ruby
- Stars
- 18
- Forks
- 23
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
If you add a new dep w/o running chef update you get a pretty cryptic message:
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete #converge action: [Expected process to exit with [0], but received '1'
---- Begin output of chef export /Users/tsmith/dev/community-cookbooks/kube/Policyfile.rb /var/folders/7q/xzcd7t315xg7n28trln90m_80000gn/T/default-debian-8-sandbox-20170905-87280-x7xt0x --force ----
STDOUT:
STDERR: Error: Invalid lockfile data
Reason: (ChefDK::DependencyConflict) Cookbook kube_test (0.0.0) has dependency constraints that cannot be met by the existing cookbook set:
Cookbook chef-apt-docker isn't included in the existing cookbook set.
---- End output of chef export /Users/tsmith/dev/community-cookbooks/kube/Policyfile.rb /var/folders/7q/xzcd7t315xg7n28trln90m_80000gn/T/default-debian-8-sandbox-20170905-87280-x7xt0x --force ----
Ran chef export /Users/tsmith/dev/community-cookbooks/kube/Policyfile.rb /var/folders/7q/xzcd7t315xg7n28trln90m_80000gn/T/default-debian-8-sandbox-20170905-87280-x7xt0x --force returned 1] on default-debian-8
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Just pointing out that this could be fixed with a simple chef update would probably help a lot of first time users.
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
Reproduce the failure by adding a dependency without running chef update, then start from the converge path that invokes chef export and surfaces the Invalid lockfile data output. Done means the resulting error clearly suggests running chef update for a cookbook missing from the policy file set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100