Jira (PUP-10929) Syntax error in previously valid puppet code due to removal of application orchestration keywords

26 views
Skip to first unread message

Alexander Fisher (Jira)

unread,
Feb 22, 2021, 10:16:01 AM2/22/21
to puppe...@googlegroups.com
Alexander Fisher created an issue
 
Puppet / Bug PUP-10929
Syntax error in previously valid puppet code due to removal of application orchestration keywords
Issue Type: Bug Bug
Affects Versions: PUP 7.4.1
Assignee: Unassigned
Components: Language
Created: 2021/02/22 7:15 AM
Priority: Normal Normal
Reporter: Alexander Fisher

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

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Gabriel Nagy (Jira)

unread,
Feb 23, 2021, 3:42:03 AM2/23/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Feb 23, 2021, 10:56:03 AM2/23/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Feb 23, 2021, 10:56:03 AM2/23/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 24, 2021, 1:23:05 PM2/24/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10929
 
Re: Syntax error in previously valid puppet code due to removal of application orchestration keywords

Adding Henrik Lindberg comment from
https://puppetcommunity.slack.com/archives/C0W1X7ZAL/p1614006476005200

there is a list of keywords that are allowed, I suspect it is missing from that list (and probably also the other keywords related to orchestration).

Henrik Lindberg (Jira)

unread,
Feb 24, 2021, 4:56:03 PM2/24/21
to puppe...@googlegroups.com

Josh Cooper It is this part of the grammar:

  attribute_name
    : NAME
    | keyword

and keyword is a rule with a list of tokens. The tokens for the now reserved keywords must be on that list to make them ok to use as names of resource attributes or the result is the reported "syntax error".

Josh Cooper (Jira)

unread,
Mar 1, 2021, 12:34:02 PM3/1/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10929

Henrik Lindberg What's the benefit to keeping those keywords reserved? It's not like someone can turn application orchestration back on.

It sounds like our options are:

1. Remove site, etc keywords from the reserved list, OR
2. Update the grammar to accept the reserved keywords and regenerate the eparser. See af9b8e0894c2d606e81671fb133d4ef73d9ed7ef and de9c2b3b01ae7202ef441da0dbc41108b8ca013a.

Henrik Lindberg (Jira)

unread,
Mar 1, 2021, 1:08:01 PM3/1/21
to puppe...@googlegroups.com

Josh Cooper The benefit of keeping them reserved is that you may want to use them in the future for something other than the now removed application orchestration and it takes a major release to get there plus a lot of pain for users if they again would be put to use if they had been free to use for a while.

You are right about the options.

Josh Cooper (Jira)

unread,
Mar 1, 2021, 2:51:02 PM3/1/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 3, 2021, 5:44:02 AM3/3/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Mar 5, 2021, 7:19:02 AM3/5/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 9, 2021, 10:31:03 AM3/9/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Mar 10, 2021, 10:32:07 AM3/10/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages