Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3863

hiera('some::key', undef) returns empty string

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: PUP 3.7.3, PUP 3.7.5
    • Fix Version/s: PUP 3.8.0, PUP 4.1.0
    • Component/s: DSL
    • Labels:
    • Template:
    • 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

        Attachments

          Issue Links

            Activity

            Hide
            amateo Angel L. Mateo added a comment -

            I'm having this same problem. But I can't use false instead of undef (because in my functions, then it would be interpreted as 'false' string)

            Show
            amateo Angel L. Mateo added a comment - I'm having this same problem. But I can't use false instead of undef (because in my functions, then it would be interpreted as 'false' string)
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            This is a Puppet problem, not a hiera problem. Moving this ticket.

            Show
            henrik.lindberg Henrik Lindberg added a comment - This is a Puppet problem, not a hiera problem. Moving this ticket.
            Hide
            henrik.lindberg Henrik Lindberg added a comment - - edited

            The problem is that the function hiera is a 3x function, and the given undef should by the 3x rules be transformed to an empty string when the call is made. Then, as pointed out, the empty string is no longer "falsey".

            A solution is to move the hiera functions to the new API where undef is passed as nil and nil can be returned to mean "puppet undef".

            Show
            henrik.lindberg Henrik Lindberg added a comment - - edited The problem is that the function hiera is a 3x function, and the given undef should by the 3x rules be transformed to an empty string when the call is made. Then, as pointed out, the empty string is no longer "falsey". A solution is to move the hiera functions to the new API where undef is passed as nil and nil can be returned to mean "puppet undef".
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Hiera however, cannot deal with a default that is nil since that is interpreted as "no default given", and that raises an error. Thus, a special value must be used internally to represent undef, and it must be transformed back to nil to be returned from the function making the call into Hiera.

            Show
            henrik.lindberg Henrik Lindberg added a comment - Hiera however, cannot deal with a default that is nil since that is interpreted as "no default given", and that raises an error. Thus, a special value must be used internally to represent undef , and it must be transformed back to nil to be returned from the function making the call into Hiera.
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            All of the hiera functions in puppet needs the same treatment.

            Show
            henrik.lindberg Henrik Lindberg added a comment - All of the hiera functions in puppet needs the same treatment.
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            However... the functions have bad semantics since there is no way to use an override and at the same time make the function raise an error if no data was found. Thus, the 4x implementation must look at arity. When implementing the 4x version it should also accept a single argument being an array containing the arguments (1, 2, or 3) since this is an undocumented feature of the hiera functions (functionality provided by HieraPuppet.parse_args).

            When implementing these functions using 4x, it is worth also adding support for calling the functions with 1 or 2 arguments + a block that is called if lookup produces no value. This provides better semantics for these functions and gives user better control. See the lookup puppet function (non hiera related) for an example. The combination "all args in an array" + a block is not meaningful to support, as an array can always be splatted into individual arguments in 4x.

            Show
            henrik.lindberg Henrik Lindberg added a comment - However... the functions have bad semantics since there is no way to use an override and at the same time make the function raise an error if no data was found. Thus, the 4x implementation must look at arity. When implementing the 4x version it should also accept a single argument being an array containing the arguments (1, 2, or 3) since this is an undocumented feature of the hiera functions (functionality provided by HieraPuppet.parse_args ). When implementing these functions using 4x, it is worth also adding support for calling the functions with 1 or 2 arguments + a block that is called if lookup produces no value. This provides better semantics for these functions and gives user better control. See the lookup puppet function (non hiera related) for an example. The combination "all args in an array" + a block is not meaningful to support, as an array can always be splatted into individual arguments in 4x.
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            This will not make it into 3.7.4. Marking it for 3.7.5

            Show
            henrik.lindberg Henrik Lindberg added a comment - This will not make it into 3.7.4. Marking it for 3.7.5
            Hide
            thomas.hallgren Thomas Hallgren added a comment -

            One interesting feature with the 3x hiera call is that it passes self as the hiera scope parameter which gets wrapped in a Hiera::Scope instance where the keys 'calling_class' and 'calling_module' have a special meaning. In order to support this we must use the Puppet::Functions::InternalFunction class and an injected scope.

            Show
            thomas.hallgren Thomas Hallgren added a comment - One interesting feature with the 3x hiera call is that it passes self as the hiera scope parameter which gets wrapped in a Hiera::Scope instance where the keys 'calling_class' and 'calling_module' have a special meaning. In order to support this we must use the Puppet::Functions::InternalFunction class and an injected scope.
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            yes, that is fine

            Show
            henrik.lindberg Henrik Lindberg added a comment - yes, that is fine
            Hide
            thomas.hallgren Thomas Hallgren added a comment -

            What is the desired behavior when no default is given and no value is found? Should the hiera function return nil or raise an error?

            Show
            thomas.hallgren Thomas Hallgren added a comment - What is the desired behavior when no default is given and no value is found? Should the hiera function return nil or raise an error?
            Hide
            thomas.hallgren Thomas Hallgren added a comment -

            Unable to get a green build on stable due to PUP-3934.

            Show
            thomas.hallgren Thomas Hallgren added a comment - Unable to get a green build on stable due to PUP-3934 .
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            The updated functions should behave as they do today wrt. if they return nil or raise an exception. (IIRC they raise an exception).

            Show
            henrik.lindberg Henrik Lindberg added a comment - The updated functions should behave as they do today wrt. if they return nil or raise an exception. (IIRC they raise an exception).
            Hide
            thomas.hallgren Thomas Hallgren added a comment -

            Merged to stable at a392b57.

            Show
            thomas.hallgren Thomas Hallgren added a comment - Merged to stable at a392b57 .
            Hide
            thomas.hallgren Thomas Hallgren added a comment -

            Merged to master at 74b64d0.
            Also reverted "(PUP-3863) Undo removal of 3x hiera functions" on master at commit 958e24d.

            Show
            thomas.hallgren Thomas Hallgren added a comment - Merged to master at 74b64d0 . Also reverted "( PUP-3863 ) Undo removal of 3x hiera functions" on master at commit 958e24d .
            Hide
            erict Eric Thompson added a comment - - edited

            verified on ubuntu 14.04 and rhel7 at master SHA: 5895c0f

            root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.35 seconds
            Notice: Applied catalog in 0.02 seconds
            root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo,undef))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.35 seconds
            Notice: Applied catalog in 0.01 seconds
            root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo,""))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.36 seconds
            Notice: Applied catalog in 0.01 seconds
            

            Show
            erict Eric Thompson added a comment - - edited verified on ubuntu 14.04 and rhel7 at master SHA: 5895c0f root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.35 seconds Notice: Applied catalog in 0.02 seconds root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo,undef))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.35 seconds Notice: Applied catalog in 0.01 seconds root@i4f68nhtgsnhw0n:/opt/puppet-git-repos/puppet# puppet apply -e 'notice(hiera(foo,""))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for i4f68nhtgsnhw0n.delivery.puppetlabs.net in environment production in 0.36 seconds Notice: Applied catalog in 0.01 seconds
            Hide
            erict Eric Thompson added a comment -

            verified on windows2012r2 at SHA: 5895c0f

            Administrator@usabf3l4rhl6wnp /cygdrive/c/ProgramData/PuppetLabs/puppet
            $ cmd /c  puppet apply -e 'notice(hiera(foo,undef))'
            Notice: Applied catalog in 0.03 seconds
            Notice: Compiled catalog for usabf3l4rhl6wnp.delivery.puppetlabs.net in environment production in 0.48 seconds
            Administrator@usabf3l4rhl6wnp /cygdrive/c/ProgramData/PuppetLabs/puppet
            $ cmd /c  puppet apply -e 'notice(hiera(foo,""))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for usabf3l4rhl6wnp.delivery.puppetlabs.net in environment production in 0.48 seconds
            Notice: Applied catalog in 0.03 seconds
            

            Show
            erict Eric Thompson added a comment - verified on windows2012r2 at SHA: 5895c0f Administrator@usabf3l4rhl6wnp /cygdrive/c/ProgramData/PuppetLabs/puppet $ cmd /c puppet apply -e 'notice(hiera(foo,undef))' Notice: Applied catalog in 0.03 seconds Notice: Compiled catalog for usabf3l4rhl6wnp.delivery.puppetlabs.net in environment production in 0.48 seconds Administrator@usabf3l4rhl6wnp /cygdrive/c/ProgramData/PuppetLabs/puppet $ cmd /c puppet apply -e 'notice(hiera(foo,""))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for usabf3l4rhl6wnp.delivery.puppetlabs.net in environment production in 0.48 seconds Notice: Applied catalog in 0.03 seconds
            Hide
            ilja.weis Ilja Weis added a comment - - edited

            With 3.7.5 and future parser, is the hiera function supposed to raise an error when I'm looking up a key that does not exist and if use undef as the default?

            $ puppet apply --parser future -e 'notice(hiera('doesnotexist',undef))'
            Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item doesnotexist in any Hiera data file and no default supplied

            Show
            ilja.weis Ilja Weis added a comment - - edited With 3.7.5 and future parser, is the hiera function supposed to raise an error when I'm looking up a key that does not exist and if use undef as the default? $ puppet apply --parser future -e 'notice(hiera('doesnotexist',undef))' Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item doesnotexist in any Hiera data file and no default supplied
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            There has been a regression after this was verified!

            Show
            henrik.lindberg Henrik Lindberg added a comment - There has been a regression after this was verified!
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Running the samples:

            puppet apply -e 'notice hiera(unknownkey, undef)' --parser future
            puppet apply -e 'notice hiera(unknownkey, "")' --parser future
            

            Both raise an error that key is not found, and default is not given. This is different from was was verified, and different from the intented fix of being able
            to return the given default irrespective of which value it has, and that undef default should return undef, and emptry string return an empty string.

            Marking this as it should be fixed for puppet 3.8.0

            Show
            henrik.lindberg Henrik Lindberg added a comment - Running the samples: puppet apply -e 'notice hiera(unknownkey, undef)' --parser future puppet apply -e 'notice hiera(unknownkey, "")' --parser future Both raise an error that key is not found, and default is not given. This is different from was was verified, and different from the intented fix of being able to return the given default irrespective of which value it has, and that undef default should return undef, and emptry string return an empty string. Marking this as it should be fixed for puppet 3.8.0
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            merged to 3.x at: 6b60d80

            Show
            henrik.lindberg Henrik Lindberg added a comment - merged to 3.x at: 6b60d80
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Verified that the following works:

            puppet apply -e 'notice "-<${hiera(noway, undef)}>-"' --parser future
            puppet apply -e 'notice "-<${hiera(noway, "")}>-"' --parser future
            puppet apply -e 'notice "--<${hiera(noway) |$x| {undef}}>---"' --parser future
            

            Both print -<>-

            puppet apply -e 'notice "-<${hiera(noway)}>-"' --parser future
            

            errors as expected with "Could not find data item".

            Show
            henrik.lindberg Henrik Lindberg added a comment - Verified that the following works: puppet apply -e 'notice "-<${hiera(noway, undef)}>-"' --parser future puppet apply -e 'notice "-<${hiera(noway, "")}>-"' --parser future puppet apply -e 'notice "--<${hiera(noway) |$x| {undef}}>---"' --parser future Both print -<>- puppet apply -e 'notice "-<${hiera(noway)}>-"' --parser future errors as expected with "Could not find data item".
            Hide
            erict Eric Thompson added a comment -

            note: needs re-verify on ubuntu and windows since we won't have full acceptance for a sprint or more

            Show
            erict Eric Thompson added a comment - note: needs re-verify on ubuntu and windows since we won't have full acceptance for a sprint or more
            Hide
            kylo Kylo Ginsberg added a comment -

            I removed the 'PUP 3.7.5' fix version since the issue isn't fully fixed in 3.7.5.

            Show
            kylo Kylo Ginsberg added a comment - I removed the 'PUP 3.7.5' fix version since the issue isn't fully fixed in 3.7.5.
            Hide
            erict Eric Thompson added a comment - - edited

            verified in ubuntu14.04 at 3.x SHA: 6b8d187

            [root@ruv38q0lb5zisac ~]# hiera foo
            bar
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo,undef))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo,""))'
            Notice: Scope(Class[main]): bar
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, undef)}>-"'
            Error: Could not parse for environment production: Syntax error at '('; expected ')' at line 1 on node ruv38q0lb5zisac.delivery.puppetlabs.net
            Error: Could not parse for environment production: Syntax error at '('; expected ')' at line 1 on node ruv38q0lb5zisac.delivery.puppetlabs.net
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, undef)}>-"' --parser future
            Notice: Scope(Class[main]): -<>-
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(foo, undef)}>-"' --parser future
            Notice: Scope(Class[main]): -<bar>-
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, "")}>-"' --parser future
            Notice: Scope(Class[main]): -<>-
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(foo, "")}>-"' --parser future
            Notice: Scope(Class[main]): -<bar>-
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "--<${hiera(noway) |$x| {undef}}>---"' --parser future
            Notice: Scope(Class[main]): --<>---
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "--<${hiera(foo) |$x| {undef}}>---"' --parser future
            Notice: Scope(Class[main]): --<bar>---
            Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds
            Notice: Finished catalog run in 0.01 seconds
            [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway)}>-"' --parser future
            Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item noway in any Hiera data file and no default supplied  at line 1:13 on node ruv38q0lb5zisac.delivery.puppetlabs.net
            Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item noway in any Hiera data file and no default supplied  at line 1:13 on node ruv38q0lb5zisac.delivery.puppetlabs.net
            

            Show
            erict Eric Thompson added a comment - - edited verified in ubuntu14.04 at 3.x SHA: 6b8d187 [root@ruv38q0lb5zisac ~]# hiera foo bar [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo,undef))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice(hiera(foo,""))' Notice: Scope(Class[main]): bar Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.02 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, undef)}>-"' Error: Could not parse for environment production: Syntax error at '('; expected ')' at line 1 on node ruv38q0lb5zisac.delivery.puppetlabs.net Error: Could not parse for environment production: Syntax error at '('; expected ')' at line 1 on node ruv38q0lb5zisac.delivery.puppetlabs.net [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, undef)}>-"' --parser future Notice: Scope(Class[main]): -<>- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(foo, undef)}>-"' --parser future Notice: Scope(Class[main]): -<bar>- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway, "")}>-"' --parser future Notice: Scope(Class[main]): -<>- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(foo, "")}>-"' --parser future Notice: Scope(Class[main]): -<bar>- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "--<${hiera(noway) |$x| {undef}}>---"' --parser future Notice: Scope(Class[main]): --<>--- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.42 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "--<${hiera(foo) |$x| {undef}}>---"' --parser future Notice: Scope(Class[main]): --<bar>--- Notice: Compiled catalog for ruv38q0lb5zisac.delivery.puppetlabs.net in environment production in 0.43 seconds Notice: Finished catalog run in 0.01 seconds [root@ruv38q0lb5zisac ~]# puppet apply -e 'notice "-<${hiera(noway)}>-"' --parser future Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item noway in any Hiera data file and no default supplied at line 1:13 on node ruv38q0lb5zisac.delivery.puppetlabs.net Error: Evaluation Error: Error while evaluating a Function Call, Could not find data item noway in any Hiera data file and no default supplied at line 1:13 on node ruv38q0lb5zisac.delivery.puppetlabs.net
            Hide
            erict Eric Thompson added a comment -

            verified in windows2012r2-rubyx64 at 3.x SHA: 6b8d187

            Administrator@oe06ecxzjzu6kwu ~
            $ cmd /c puppet apply -e 'notice("Y${hiera(noway,undef)}Y")' --parser future
            Notice: Scope(Class[main]): YY
            Notice: Finished catalog run in 0.03 seconds.delivery.puppetlabs.net in environment production in 0.52 seconds
             
            Administrator@oe06ecxzjzu6kwu ~
            $ cmd /c puppet apply -e 'notice("Y${hiera(foo,"")}Y")' --parser future
            Notice: Scope(Class[main]): YY
            Notice: Compiled catalog for oe06ecxzjzu6kwu.delivery.puppetlabs.net in environment production in 0.53 seconds
            Notice: Finished catalog run in 0.08 seconds
             
            Administrator@oe06ecxzjzu6kwu ~
            $ cmd /c puppet apply somesuch.pp --parser future
            Notice: Scope(Class[main]): YY
            Notice: Compiled catalog for oe06ecxzjzu6kwu.delivery.puppetlabs.net in environment production in 0.58 seconds
            Notice: Finished catalog run in 0.03 seconds
             
            Administrator@oe06ecxzjzu6kwu ~
            $ cat somesuch.pp
            notice("Y${hiera(noway) |$x| {undef}}Y")
            

            Show
            erict Eric Thompson added a comment - verified in windows2012r2-rubyx64 at 3.x SHA: 6b8d187 Administrator@oe06ecxzjzu6kwu ~ $ cmd /c puppet apply -e 'notice("Y${hiera(noway,undef)}Y")' --parser future Notice: Scope(Class[main]): YY Notice: Finished catalog run in 0.03 seconds.delivery.puppetlabs.net in environment production in 0.52 seconds   Administrator@oe06ecxzjzu6kwu ~ $ cmd /c puppet apply -e 'notice("Y${hiera(foo,"")}Y")' --parser future Notice: Scope(Class[main]): YY Notice: Compiled catalog for oe06ecxzjzu6kwu.delivery.puppetlabs.net in environment production in 0.53 seconds Notice: Finished catalog run in 0.08 seconds   Administrator@oe06ecxzjzu6kwu ~ $ cmd /c puppet apply somesuch.pp --parser future Notice: Scope(Class[main]): YY Notice: Compiled catalog for oe06ecxzjzu6kwu.delivery.puppetlabs.net in environment production in 0.58 seconds Notice: Finished catalog run in 0.03 seconds   Administrator@oe06ecxzjzu6kwu ~ $ cat somesuch.pp notice("Y${hiera(noway) |$x| {undef}}Y")
            Hide
            amuraru Adrian Muraru added a comment -

            This is still listed in 3.7.5 Changelog: https://docs.puppetlabs.com/puppet/latest/reference/release_notes.html#future-parser-fixes-and-updates make it confusing for users

            Show
            amuraru Adrian Muraru added a comment - This is still listed in 3.7.5 Changelog: https://docs.puppetlabs.com/puppet/latest/reference/release_notes.html#future-parser-fixes-and-updates make it confusing for users
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Ping Nicholas Fagerlund How about rewriting a bit of history and dropping the mention that this problem was fixed for 3.7.5 since that fix was broken? (See comment before this).

            Show
            henrik.lindberg Henrik Lindberg added a comment - Ping Nicholas Fagerlund How about rewriting a bit of history and dropping the mention that this problem was fixed for 3.7.5 since that fix was broken? (See comment before this).
            Hide
            nick.fagerlund Nicholas Fagerlund added a comment - - edited

            Henrik Lindberg Ok, will do.

            Removed release note in 88bb24ab54771bb6bdd8e18d8f6ef4e187c76589.

            Show
            nick.fagerlund Nicholas Fagerlund added a comment - - edited Henrik Lindberg Ok, will do. Removed release note in 88bb24ab54771bb6bdd8e18d8f6ef4e187c76589.

              People

              • Assignee:
                Unassigned
                Reporter:
                rw Ryan Whitehurst
                QA Contact:
                Eric Thompson
              • Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support