Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'channel' attributes are Symbols, Policyfiles won't allow Symbols #234

Open
mattray opened this issue Aug 10, 2018 · 1 comment
Open

'channel' attributes are Symbols, Policyfiles won't allow Symbols #234

mattray opened this issue Aug 10, 2018 · 1 comment
Labels
Type: Enhancement Adds new functionality.

Comments

@mattray
Copy link

mattray commented Aug 10, 2018

This is a bug for chef-ingredient currently, but it may be considered a Policyfile bug.

If you try to set :stable in your Policyfile you get
Reason: (ChefDK::InvalidPolicyfileAttribute) Invalid type in attributes. Only Hash, Array, String, Integer, Float, true, false, and nil are accepted. You gave :stable (Symbol)

Strings will work.

@wrightp
Copy link

wrightp commented Aug 10, 2018

@mattray I understand why this is confusing since the channel attribute restricts types to Symbols. This isn't as much a bug in Policyfiles or chef-ingredient as it is more idiosyncratic. The issue here is that the cookbook shouldn't use Symbols and should use Strings for this exact reason - it can be confusing - although it works functionally. I do agree the cookbook should be updated to eliminate this Ruby-ism. Noted!

@wrightp wrightp closed this as completed Aug 10, 2018
@wrightp wrightp added the Type: Enhancement Adds new functionality. label Aug 11, 2018
@wrightp wrightp self-assigned this Aug 11, 2018
@wrightp wrightp reopened this Aug 11, 2018
@wrightp wrightp removed their assignment Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants