Handle cookbook_version being Nil
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 18
- Forks
- 23
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
Version:
All versions of Chef CLI
Environment:
Tested in Docker
Scenario:
Run chef install (which resolves to chef-cli install) on a policyfile that has a cookbook dependency with missing information
Steps to Reproduce:
I can reproduce this each time on my repo though I do not know which of my cookbooks/dependencies are causing it
Expected Result:
Policyfile.lock should be generated
Actual Result:
Caching Cookbooks...
Error: Failed to generate Policyfile.lock
Reason: (NoMethodError) undefined method `metadata' for nil:NilClass
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 by reproducing the failure with chef install on a Policyfile containing a cookbook dependency with missing information, then trace the dependency-resolution path that raises undefined method metadata for nil:NilClass. Identify which cookbook or dependency produces the nil cookbook_version; done means the lockfile is generated or the failure reports the missing information clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100