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

Lambda iterator function each() does not accept array as input parameter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 5.0.0
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      The lambda iterator function each() was broken in Puppet 5 for array as an input parameter.

      Note the following trivial example:

      ['foo', 'bar'].each |String $string| {
        notify { $string: }
      }
      

      works as expected in Puppet 4.10.4 but throws the error:

      Error: Expression is not valid as a resource, resource-default, or resource-override
      

      in Puppet 5.0.0.

      I have verified that a hash as an input parameter to each() and array as an input parameter to slice() both work correctly in Puppet 5, so this bug is isolated.

      Note SO question I opened over this: https://stackoverflow.com/questions/44958689/lambda-iterator-over-array-parameter-input-broken-in-puppet-5

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                mis6541 Matt Schuchard
                Reporter:
                mis6541 Matt Schuchard
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support