Details
-
Improvement
-
Status: Accepted
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
Phoenix
-
Needs Assessment
Description
The Jira issue PUP-10105, solved an issue where puppet resource --to_yaml would emit puppet class tags by updating the way PScalarDataType#instance? checks whether an object is an instance of the said type.
The problem was that some of the resource's fields would be ProcessOutput objects, which is a child class of ruby String, and the instance? method used `is_a?` to check whether the ProcessOutput object was an instance. In this case, due to the way `is_a?` works, the instance? method would return true, since the object is a child of String.
To fix this issue, we updated the method to use `instance_of?` when checking Strings, so it would only return true for actual ruby Strings.
The next step would be to update the `instance?` methods for the rest of Data and RichData data types such as (Integer/Float/Fixnum/Bignum/Rational)
Attachments
Issue Links
- relates to
-
PUP-10105 regression: puppet resource --to_yaml should not emit puppet class tags
-
- Resolved
-