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

    • Night's Watch
    • 2
    • NW - 2021-03-17
    • Needs Assessment
    • Bug Fix
    • Hide
      `application`, `consumes`, `produces` and `site` were removed from reserved keywords list
      Show
      `application`, `consumes`, `produces` and `site` were removed from reserved keywords list
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support