Jira (PUP-6965) Improve parser error messages

4 views
Skip to first unread message

Tim Purkerson (JIRA)

unread,
Dec 1, 2016, 5:24:05 PM12/1/16
to puppe...@googlegroups.com
Tim Purkerson created an issue
 
Puppet / Improvement PUP-6965
Improve parser error messages
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2016/12/01 2:23 PM
Priority: Normal Normal
Reporter: Tim Purkerson

Add more detail to the error messages that will allow much quicker debugging. Such as line numbers where the error occurs or suggested diagnostic flags.

For example, received the error message:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment pr001: Found 4 errors. Giving up in /app/puppet/environments/apps/test/pr001/manifests/params.pp on node pr.server.com

Those four errors took several hours to track down in the very large params.pp file. Having line numbers would have made the debugging task much easier.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Dec 1, 2016, 5:57:04 PM12/1/16
to puppe...@googlegroups.com
Henrik Lindberg commented on Improvement PUP-6965
 
Re: Improve parser error messages

Those 4 errors were logged for sure. The line numbers are there.
The number of errors to log before giving up is set to 10. It can be set to one to only report the first - in which case there is no aggregate error message like the one in the Description above.

When there is an aggregation of errors - we could naturally include all the files/lines and messages in the message for the aggregate. Would that be a better solution than saying "giving up" ?

And in this case. Didn't "puppet parser validate params.pp" reveal the individual errors?

Henrik Lindberg (JIRA)

unread,
Dec 1, 2016, 5:59:04 PM12/1/16
to puppe...@googlegroups.com
Henrik Lindberg assigned an issue to Tim Purkerson
Change By: Henrik Lindberg
Assignee: Tim Purkerson

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 3:09:06 PM5/16/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Labels: triaged

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 3:09:43 PM5/16/17
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Team: Agent

Henrik Lindberg (JIRA)

unread,
May 22, 2017, 5:30:02 AM5/22/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Component/s: Language

Henrik Lindberg (JIRA)

unread,
May 22, 2017, 5:30:03 AM5/22/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Fix Version/s: PUP 5.y

Henrik Lindberg (JIRA)

unread,
May 22, 2017, 5:32:03 AM5/22/17
to puppe...@googlegroups.com

I think a simple "see server log for details" in the "giving up" message is an easy and helpful thing to add.
Alternatively, pick the first error - and add "first error is: " + its location to "giving up". Then at least errors can be located and fixed one by one.

David McTavish (Jira)

unread,
Dec 6, 2021, 12:00:02 PM12/6/21
to puppe...@googlegroups.com
David McTavish updated an issue
Change By: David McTavish
Labels: low-hanging-fruit nice-to-have
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

David McTavish (Jira)

unread,
Dec 6, 2021, 1:38:01 PM12/6/21
to puppe...@googlegroups.com
David McTavish updated an issue
Change By: David McTavish
Priority: Normal Low
Reply all
Reply to author
Forward
0 new messages