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

update chef_ingredient resource timeout property to be chef 13 compliant #156

Merged
merged 1 commit into from
Apr 19, 2017

Conversation

wrightp
Copy link

@wrightp wrightp commented Apr 18, 2017

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

@wrightp wrightp force-pushed the pw/chef13 branch 4 times, most recently from e91feeb to e6fd214 Compare April 19, 2017 04:36
@@ -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
Copy link
Contributor

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]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tas50 @schisamo What are the implications to removing the property type NilClass from a property for Chef 12 and 13?

Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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

Copy link
Author

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.

@wrightp wrightp force-pushed the pw/chef13 branch 4 times, most recently from b3dac53 to 77ee08f Compare April 19, 2017 15:03
- update all properties to use new type syntax
- add windows kitchen test via appveyor

Signed-off-by: Patrick Wright <[email protected]>
@wrightp wrightp merged commit fc5d505 into master Apr 19, 2017
@lamont-granquist
Copy link

yeah this is actually a bug in core chef

windows_package is overriding the timeout property and violating ye olde Liskov substitution principle

@schisamo schisamo deleted the pw/chef13 branch April 19, 2017 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants