Description
Is this a critical security issue?
No
- This is not a security issue.
Describe the Bug
I have a custom type with a boolean property defined as
newproperty(:myprop, parent: Puppet::Property::Boolean) do
end
On puppet run when 'is' value is true and 'should' value is false, the insync? is never invoked and puppet does not change the value of the property!
I think the problem is here https://github.com/OpenVoxProject/puppet/blob/main/lib/puppet/property.rb#L274
when @should
is false at this point safe_insync?
never invoke insync?
Since Puppet::Property blocks type implementations from overriding `safe_insync? this bug really makes it impossible to use Puppet::Property::Boolean as parent in custom type properties.
Expected Behavior
When there is an actual state change for a property using Puppet::Property::Boolean as parent I expect puppet to change the value.
Steps to Reproduce
Create a custom type with a property like mentioned.
Write the provider so that instances/prefetch set the property to true.
Test type with property set to false.
Environment
All supported versions
Additional Context
No response