[PUP-9180] nested :undef symbol transformed to empty string in 3x function calls Created: 2018/09/26  Updated: 2018/10/02  Resolved: 2018/09/26

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 6.0.1

Type: Bug Priority: Blocker
Reporter: Henrik Lindberg Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Template: PUP Bug Template
Team: Froyo
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: Tests (or Ruby logic in one function calling other functions) that assumed that calling a function with a nested {{:undef}} would convert it to either {{nil}} or leave it as {{:undef}} where no longer true in Puppet 6.0.0. This was changed in PUP-9112 where certain transformations were no longer needed because the language did not need them. Turned out tests, and possibly custom logic in Ruby would benefit from keeping conversions.

The fix is that {{:undef}} in nested array and hash values will be converted to {{nil}} and this makes a difference when calling 3x functions from Ruby.
QA Risk Assessment: Needs Assessment


Nested :undef symbol is transformed to empty string in 3x function calls. This is a side effect of PUP-9112 as the language no longer uses :undef, and the return values of 3x functions are transformed to not contain :undef. There is however a problem in that there are many tests that test against :undef inside structures in the belief that this is how the language would present the value to the function (it once was).

Thus, it would be beneficial to allow these tests to continue working.

Comment by Kenn Hussey [ 2018/09/26 ]

Josh Cooper FYI.

Comment by Josh Cooper [ 2018/09/26 ]

Merged to 6.0.x inĀ https://github.com/puppetlabs/puppet/commit/f9a3e17ffa75b806404fc220fb1ead9efd8b348f

Comment by Josh Cooper [ 2018/09/26 ]

Passed CI in e2f7ccfb7

Generated at Thu Jan 21 19:24:50 PST 2021 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.