-
Notifications
You must be signed in to change notification settings - Fork 54
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
update chef_ingredient resource timeout property to be chef 13 compliant #156
Conversation
e91feeb
to
e6fd214
Compare
resources/chef_ingredient.rb
Outdated
@@ -20,34 +20,35 @@ | |||
|
|||
default_action :install | |||
|
|||
property :product_name, kind_of: String, name_attribute: true | |||
property :config, kind_of: String | |||
property :product_name, String, name_attribute: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name_attribute -> name_property
|
||
# Package resources used on rhel and debian platforms | ||
property :options, kind_of: String | ||
property :timeout, kind_of: [Integer, String, NilClass] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll throw errors if someone tries to explicitly set it to a nil somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm debating adding nil
back into the type array now since I'm sure sure if this will break cookbooks that may be setting timeout
to nil
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't hurt anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting weird results with Windows. Looks like it actually may be a bug in chef after all. I'm checking on it now. NilClass property types in Windows are not being recognized as a valid type even when set.
b3dac53
to
77ee08f
Compare
- update all properties to use new type syntax - add windows kitchen test via appveyor Signed-off-by: Patrick Wright <[email protected]>
yeah this is actually a bug in core chef windows_package is overriding the timeout property and violating ye olde Liskov substitution principle |
Signed-off-by: Patrick Wright [email protected]
Description
chef_ingredient packages installs break on Windows using Chef 13. This fixes the issue and updates tests.
Issues Resolved
#155
Check List