-
Type:
Bug
-
Status: Resolved
-
Priority:
Normal
-
Resolution: Fixed
-
Affects Version/s: PUP 5.5.16, PUP 6.7.2
-
Fix Version/s: PUP 6.15.0
-
Component/s: Types and Providers
-
Labels:
-
Template:
-
Team:Night's Watch
-
Story Points:1
-
Sprint:NW - 2020-02-05, NW - 2020-02-19, NW - 2020-03-04, NW - 2020-03-17, NW - 2020-04-01
-
Method Found:Needs Assessment
-
Release Notes:Enhancement
-
Release Notes Summary:
-
QA Risk Assessment:Needs Assessment
The core user type has a custom retrieve() method which returns a Hash that is inconsistent with the data type returned by the common method in Puppet::Type.retrieve(). As a result, mechanisms expecting to use retrieve() will have problems with user resources.
Here is the offending code in the user type: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/user.rb#L496-L513
I think it may be safe and desirable to just remove the user type's retrieve block and let the standard one take effect. The existing retrieve method seems to be 10+ years old and may just be an artifact of a much earlier time in Puppet's life.
Regardless if the method is needed or not, it should have a return value consistent with the expected return value from the standard Puppet::Type.retrieve() method.