On Tue, Jan 25, 2011 at 03:16:48PM -0800, Paul Berry wrote:
> Created a method safe_insync? which first checks whether the property
> has a "should" value of nil, and if so returns true.  Most insync?
> methods were already doing this, but a few were not, leading to bugs
> if a property was being audited but not set.
> 
> Types should continue to override the insync? method, but callers of
> insync? should call safe_insync? instead.

Hm this will be just another layer I have to understand what is going on
and what checks are performed in what stage. In my opinion the best »fix«
would be to not overwrite insync in the first place. A few types for
example are overwriting it because they want to compare the full should
array and doing something like

   is == @should # or is.sort == @should.sort

if they wouldnt use Puppet::Property but Puppet::Property::List/OrderedList
instead, they wouldnt have to do this.

-Stefan

Attachment: pgpAtXAD9Sx2X.pgp
Description: PGP signature

Reply via email to