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

component to capability mapping (both produce and consume) don't allow trailing comma on last parameter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.3.0
    • None
    • None
    • Not Needed
    • Part of new feature

    Description

      Since Puppet 2.7, the language allowed the last parameter in a resource, class param list--wherever, to have a trailing comma. This is convenient as a courtesy to the next person modifying the parameter list who may not think to add a comma to your parameter when they add their own.

      Forge::Db produces Sql {
        user     => $user,
        password => $password,
        host     => $host,
        database => $name,
      }
      Forge::Api consumes Sql {
        db_name => $database,
        db_user => $user,
        db_password => $password,
        db_host => $host,
      }
      

      Both of these statements fail when the comma after either $name and $host are present. We need to allow these trailing commas to remain consistent with the behavior expected from the rest of the Puppet DSL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ryan Ryan Coleman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support