Jira (PUP-9816) puppet parser validate version 6.6.0 does not accept STDIN properly

42 views
Skip to first unread message

Konrad Scherer (JIRA)

unread,
Jul 8, 2019, 4:46:03 PM7/8/19
to puppe...@googlegroups.com
Konrad Scherer created an issue
 
Puppet / Bug PUP-9816
puppet parser validate version 6.6.0 does not accept STDIN properly
Issue Type: Bug Bug
Affects Versions: PUP 6.6.0, PUP 6.5.0
Assignee: Unassigned
Components: Compiler
Created: 2019/07/08 1:45 PM
Priority: Minor Minor
Reporter: Konrad Scherer

Puppet Version: 6.6.0 and 6.5.0
Puppet Server Version: N/A
OS Name/Version: Ubuntu 19.04 using bionic packages 6.6.0-1bionic

Passing code over stdin to puppet parser fails with 'Error: undefined method `message' for nil:NilClass'. I was able to reproduce with 6.5.0 and 6.6.0, but not with 6.4.2

Desired Behavior:

Validation of code using filename or stdin should be identical

Actual Behavior:

> touch foo.pp
> puppet parser validate foo.pp
> cat foo.pp | puppet parser validate
Error: undefined method `message' for nil:NilClass
Error: Try 'puppet help parser validate' for usage

I noticed this because emacs flycheck uses stdin to do syntax checking.

Note that the documentation (man puppet parser) states that this is a valid way to submit output:

EXAMPLES

 

Validate from STDIN:

$ cat init.pp | puppet parser validate

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

Jorie Tappa (JIRA)

unread,
Jul 15, 2019, 1:08:02 PM7/15/19
to puppe...@googlegroups.com
Jorie Tappa updated an issue
Change By: Jorie Tappa
Team: Puppet Developer Experience

Jorie Tappa (JIRA)

unread,
Jul 15, 2019, 1:09:03 PM7/15/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Jul 15, 2019, 1:09:03 PM7/15/19
to puppe...@googlegroups.com

Jesse Scott (JIRA)

unread,
Jul 15, 2019, 4:28:03 PM7/15/19
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-9816
 
Re: puppet parser validate version 6.6.0 does not accept STDIN properly

This seems to only surface when there are no parse errors in the manifest. (E.g. a blank manifest)

Konrad Scherer (JIRA)

unread,
Jul 15, 2019, 4:35:03 PM7/15/19
to puppe...@googlegroups.com

I see it both with empty files and large valid puppet files like my manifests/nodes.pp

Jesse Scott (JIRA)

unread,
Jul 15, 2019, 5:01:03 PM7/15/19
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-9816

Yes, sorry I did not mean to imply that a blank manifest was the only example. Any manifest that does not produce parse errors will trigger this, of which a blank manifest is the minimal example.

Jesse Scott (JIRA)

unread,
Jul 15, 2019, 5:03:03 PM7/15/19
to puppe...@googlegroups.com

Jesse Scott (JIRA)

unread,
Jul 15, 2019, 5:05:02 PM7/15/19
to puppe...@googlegroups.com
Jesse Scott commented on Bug PUP-9816

Jorie Tappa not sure who I should ping for review of the fix PR ^^

Henrik Lindberg (JIRA)

unread,
Jul 15, 2019, 5:46:03 PM7/15/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Jul 19, 2019, 11:18:03 AM7/19/19
to puppe...@googlegroups.com
Jorie Tappa commented on Bug PUP-9816

merged to master at 6713c73

Jesse Scott could you please add release notes to the "DOCS" tab of the ticket about the regression & fix? Thanks!

Jesse Scott (JIRA)

unread,
Jul 19, 2019, 4:17:03 PM7/19/19
to puppe...@googlegroups.com
Jesse Scott updated an issue
 

Added release note summary, there is a lot more detail in the commit message of the PR if needed when writing release notes.

Change By: Jesse Scott
Release Notes Summary: Resolved an issue where `puppet parser validate` would fail with an error when a valid manifest was passed in via the STDIN pipe.
Release Notes: Bug Fix

Alexandru Popa (JIRA)

unread,
Aug 14, 2019, 9:17:04 AM8/14/19
to puppe...@googlegroups.com

Alexandru Popa (JIRA)

unread,
Aug 14, 2019, 9:47:03 AM8/14/19
to puppe...@googlegroups.com
Alexandru Popa commented on Bug PUP-9816
 
Re: puppet parser validate version 6.6.0 does not accept STDIN properly

Jesse Scott this can be closed due that the commit is already on the master branch and the CI is green.

It will be added in the 6.8.0 release

Thanks,

Alex

Josh Cooper (JIRA)

unread,
Aug 14, 2019, 4:31:04 PM8/14/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9816

Passed CI in c956ad95fcdd9aabb28e196b55d1f112b5944777

Jean Bond (JIRA)

unread,
Aug 19, 2019, 6:40:03 PM8/19/19
to puppe...@googlegroups.com
Jean Bond updated an issue
 
Change By: Jean Bond
Labels: resolved-issue-added
Reply all
Reply to author
Forward
0 new messages