chef / cheffish

Resources and tools for testing and interacting with Chef and Chef Server.
Apache License 2.0
38 stars 28 forks source link

Add provides statements to avoid chef-client warnings #60

Closed stevendanna closed 9 years ago

jtimberman commented 9 years ago

LGTM :shipit:

tyler-ball commented 9 years ago

@stevendanna Would you mind adding it to all the resources too? Thats the recommendation (I think)

tyler-ball commented 9 years ago

Also, we either need to bump the dependent version of chef up to ~> 12.3 or make this backwards compatible to versions before provides was supported.

Although, I can't figure out when that keyword was added.... The CHANGELOG doesn't have a specific entry. I think https://github.com/chef/chef/pull/3374 is the appropriate PR.

randomcamel commented 9 years ago

Seems like it'd be a good idea to import the .travis.yml from chef-provisioning and run the specs against all the Chef versions.

stevendanna commented 9 years ago

@stevendanna Would you mind adding it to all the resources too? Thats the recommendation (I think)

Really? I'm starting to think that the architects of the new Resource/Provider patterns need to write canonical examples for what these need to look like. Perhaps they already exists?

jtimberman commented 9 years ago

@randomcamel I don't know that those are needed in the resources. The thing that warns is when a resource doesn't have resource_name - as the warning messages indicate.

I think we're okay because of lines like this:

https://github.com/chef/cheffish/blob/ssd/warning/lib/chef/resource/chef_acl.rb#L5

Paging @jkeiser and @lamont-granquist

jkeiser commented 9 years ago

Yeah, I'm surprised self.resource_name = 'blah' is not clearing the warning for the LWRP. That sounds like I missed a spot for warning clearage.

tyler-ball commented 9 years ago

I'm going to go ahead and merge this - we threw out a bunch of improvement ideas but those all need to be filed as new bugs. Lets not scope creep this. Thanks @stevendanna !