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

Splatting attributes into an amended attribute block isn't supported

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Done
    • PUP 3.8.0, PUP 4.0.0
    • PUP 3.8.1, PUP 4.1.0
    • Language
    • None
    • 2
    • Language 2015-04-29, Language 2015-05-13
    • Bug Fix

    Description

      Per henrik.lindberg in email, this is supposed to work... but it totally doesn't.

      notify {'first':}
       
      $myattrs = {"message" => "from a reference attribute block"}
       
      Notify[first] { *=> $myattrs }
      # Error: Could not parse for environment production: The operator '* =>' in an Object is not supported. at /Users/nick/Documents/splat_reference.pp:5:17 on node magpie.lan
       
      notify {'extra': *=> $myattrs }
      # works fine.
       
      Notify <| title == 'first' |> { *=> $myattrs }
      # Error: Could not parse for environment production: In Puppet::Pops::Model::CollectExpression : Can not use a Puppet::Pops::Model::AttributesOperation where a Puppet::Pops::Model::AttributeOperation is expected on node magpie.lan
      

      QA


      risk: medium
      probability: low (passing a whole block)
      severity: medium (work-arounds available, obvious problem)
      test layer: unit-integration

      Attachments

        Activity

          People

            Unassigned Unassigned
            nick.fagerlund Nicholas Fagerlund
            Eric Thompson Eric Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support