chef / chef/chef-cli

chef install should warn users if local cookbook isn't used

Open
#83 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect: UX
Dominant language
Ruby
Stars
18
Forks
23
Avg merge
5d 17h
Merged PRs (30d)
1

Description

Description

If you have this Policyfile.rb in a cookbook:

name 'kitchen-cloudpassage'

default_source :supermarket, 'https://supermarket.chef.io'

run_list 'recipe[chef-vault::default]', 'recipe[mycookbook::default]'

But forget to add this line:

cookbook 'mycookbook', path: '.'

Then a chef install Policyfile.rb command will dutifully look to your supermarket for the mycookbook cookbook. This could get very confusing.

Suggestion: warn the user that they are NOT using the local cookbook (as defined in the metadata.rb that is located as a peer to the Policyfile.rb file.

ChefDK Version

Chef Development Kit Version: 1.3.43

Platform Version

Mac OSX

Replication Case

See above

Stacktrace

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown chef install Policyfile.rb case with the provided Policyfile.rb and its peer metadata.rb. Trace how the install command resolves mycookbook when the local path declaration is absent. Done means the command clearly warns that the local cookbook is not being used, without a stack trace.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.