Jira (PUP-9306) Regression in heredoc parser in 5.5.8

2 views
Skip to first unread message

Adam Bottchen (JIRA)

unread,
Nov 7, 2018, 2:41:06 PM11/7/18
to puppe...@googlegroups.com
Adam Bottchen created an issue
 
Puppet / Bug PUP-9306
Regression in heredoc parser in 5.5.8
Issue Type: Bug Bug
Affects Versions: PUP 5.5.8
Assignee: Unassigned
Created: 2018/11/07 11:40 AM
Priority: Major Major
Reporter: Adam Bottchen

Puppet Version: 5.5.8
Puppet Server Version: N/A
OS Name/Version: N/A

Starting with Puppet 5.5.8, previously working code now fails to validate or compile:

$text = @("EOT")
         foo=${a}(value="${h['v']}")
         |EOT

Desired Behavior:
This code should validate and compile normally.

Actual Behavior:

# puppet parser validate test.pp
Error: Could not parse for environment production: Syntax error at '[' (file: /root/test.pp, line: 3, column: 12)

Note that the spacing, brackets, and parentheses must be of the form above to replicate the error. It seemed as though changing pretty much anything along those lines caused the error to disappear.

This looks to be a regression caused by the changes from https://github.com/puppetlabs/puppet/pull/7114/commits/49b42a55a181f7b68663edcd2e99fc21001f967b. If I back out that commit, the code validates and compiles as it did in Puppet 5.5.6.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Nov 7, 2018, 4:57:02 PM11/7/18
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-9306
 
Re: Regression in heredoc parser in 5.5.8

This is the same as PUP-9303 which has the full explanation. I fix is coming shortly. Closing this as a duplicate, but will test the sample in here as well.

Henrik Lindberg (JIRA)

unread,
Nov 7, 2018, 5:00:06 PM11/7/18
to puppe...@googlegroups.com

Before the commit that was mentioned above, the problem would simply move such that it would look at another (seemingly random) position and it probably finds a non space there - that is why the snippet in this ticket then "works" - but it would break if moved or margin of the heredoc is changed.
PUP-9303 will have the full fix for this problem.

Charlie Sharpsteen (JIRA)

unread,
Nov 8, 2018, 11:42:02 PM11/8/18
to puppe...@googlegroups.com

Hah, ran into this exact issue today with another ticket. Had to do a triple-take as it only showed up when the heredoc was nested just right within a resource parameter and then a case statement. Glad to see it's a known issue

Austin Boyd (JIRA)

unread,
Dec 12, 2019, 8:49:04 AM12/12/19
to puppe...@googlegroups.com
Austin Boyd updated an issue
 
Change By: Austin Boyd
Zendesk Ticket IDs: 32661
Zendesk Ticket Count: 1
Reply all
Reply to author
Forward
0 new messages