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

Syntax error in previously valid puppet code due to removal of application orchestration keywords

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-03-17
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      `application`, `consumes`, `produces` and `site` were removed from reserved keywords list
      Show
      `application`, `consumes`, `produces` and `site` were removed from reserved keywords list
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version:

      7.4.1

      class foo (
        $site,
      ) {
        notice $site
      }
       
      class { foo:
        site => 'bar', # syntax error on this line in puppet 7
      }

       

      The above code works fine in Puppet 4, 5 and 6 despite `site` being on the list of reserved words here. https://puppet.com/docs/puppet/7.4/lang_reserved.html#lang_reserved_words

      Actual Behavior:

      Error: Could not parse for environment production: Syntax error at 'site' (file: /home/halexfis/test.pp, line: 8, column: 3) on node test

      https://puppet.com/docs/puppet/7.4/lang_reserved.html#lang_reserved_words doesn't explicitly say you can't use these words as parameter names, and other examples from that list continue to work fine. (eg. 'node').

      It looks like this regression was caused by https://tickets.puppetlabs.com/browse/PUP-10446

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ciprian.badescu Ciprian Badescu
              Reporter:
              alexjfisher Alexander Fisher
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support