Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Normal
-
Resolution: Done
-
Affects Version/s: PUP 3.7.3, PUP 3.7.5
-
Component/s: Compiler
-
Labels:
-
Template:customfield_10700 62710
-
Story Points:2
-
Sprint:Language 2015-02-04, Language 2015-02-18, Language 2015-04-01, Language 2015-04-15
-
Release Notes:Bug Fix
Description
When using the hiera() function with a second parameter of undef, Hiera returns the empty string for the value. When using Puppet 3.7 future parser, this means that Hiera returns a truthy value when it cannot find a key.
In the Puppet 3 language, this doesn't matter because '' == undef evaluates to true.
A workaround for this is to specify a second parameter of false instead of undef, but that doesn't make this behavior any less confusing.
Final resolution: In the Puppet 4 language, the hiera functions will now respect and return a default of undef, same as they do in the Puppet 3 language. (in comment)
risk assessment: high
probability: high (regression)
severity: medium (can work around in puppet code, but it's not-expected)
highest test layer: acceptance
FR only for now (acceptance is ticketed in a larger test for all functions) PUP-4342