[chef-dev] recipe_eval notifies every time

Chronological Thread 
  • From: Andrea Campi < >
  • To: Chef Dev < >
  • Subject: [chef-dev] recipe_eval notifies every time
  • Date: Sun, 27 Jan 2013 22:46:44 +0100

tl;dr I think Chef::Provider #set_updated_status should not force updated_by_last_action to true for LWRPs whose action(s) call recipe_eval.

Example: the apt cookbook was recently changed from the traditional, cargo-cult-ish way to recipe_eval (https://github.com/opscode-cookbooks/apt/commit/4b5bfd513deb6aeb9258517243f1474f5cd4667c)

This is a very nice change, as it makes things more readable and more "natural" to anybody who knows Chef.
Unfortunately, now apt_repository will notify every time.

That happens because in https://github.com/opscode/chef/blob/master/lib/chef/provider.rb#L131 converge_actions will not be empty, and thus the resource will be forced to updated=true. There isn't much an LWRP can do to fix that.

So I'm wondering, why does #set_updated_status do that? Is there any reason or is it old cruft? Do people even agree this is a problem? :)


Archive powered by MHonArc 2.6.16.