Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Aaron Zauner commented on an issue Re: puppet parser validate - no output when everything's ok +1 Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Daniel Dreier updated an issue Puppet / PUP-2341 puppet parser validate - no output when everything's ok Change By: Daniel Dreier Issue Type: Bug Improvement Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Daniel Dreier commented on an issue Re: puppet parser validate - no output when everything's ok Recategorized from bug to improvement because no output on success is the expected behavior of most *nix tools. If this is implemented, I think it would be best to add to a --verbose flag, or at least a --quiet flag to suppress it, because it would create a lot of unnecessary noise as default behavior. For example, my rake tests involve something along the lines of "find -name '*.pp' -exec puppet validate {} \;" – meaning that an "OK" message on output would be repeated dozens or hundreds of times on a larger project. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Aaron Zauner commented on an issue Re: puppet parser validate - no output when everything's ok I don't entirely get why not output at all on success is the expected behavior of unix tools? That may be true for simple things like rm, cp and so forth but a parser? not really. how about just writing to stderr? Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/gr
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Daniel Dreier commented on an issue Re: puppet parser validate - no output when everything's ok On reflection, it looks like my use case would readily be satisfied by simply passing validate a large list of files. I'd still like a --quiet option for use in scripts, and purely from an aesthetic perspective I like the traditional no output on success, but I can definitely see why it has the potential to be confusing. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to pu
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok The Unix philosophy relevant here is "succeed silently, fail noisily". Don't think that is something we want to go against. The puppet validation can easily be wrapped in your own script and print ok if it exits with 0. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.goog
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok or just do like this: {code] puppet parser validate foo.pp --parser future; if test $? -eq 0; then echo 'ok'; fi Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+u
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok I am closing this as "won't fix" since puppet follows the unix philosophy. I don't think adding a --verbose flag with the only purpose of printing ok if there were no errors is very valuable. For any real development flow it is far better to test the entire catalog and using rspec to do this. Any parse/validation errors will then also be caught. Alternatively, you can trigger the compilation of the catalog which also catches issues with files not being found and the effect of hiera use, reading files, as well as evaluation errors, circular dependencies, etc. etc. One alternative is also to use puppet master compile to produce a catalog (then you will get lots of output when it is ok, and errors otherwise. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Aaron Zauner commented on an issue Re: puppet parser validate - no output when everything's ok `puppet master compile` makes sense. thanks for your reasoning - i'm fine with that. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok Also, do checkout rspec-puppet if you haven't already, it basically gives you programmatically driven catalog compilation + assertions that the results are what you expect them to be. If the main problem is authoring manifests, then a tool like Puppetlabs Geppetto that gives instant feedback (as you are typing) about syntax and stylistic problems may be the best tool. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Carthik Sharma commented on an issue Re: puppet parser validate - no output when everything's ok I am sorry my comment from redmine did not get imported. So let me paraphrase: The command: apachectl -T Returns a "Syntax OK" when the config files are syntactically correct. Since Puppet itself is written in ruby, the output of: ruby -c might be of interest, and it too returns a "Syntax OK". Puppet is not (just) a *nix tool. Lastly, adding a "-v" flag would still be in keeping with Unix design philosophies. In Puppet's world, the stance taken on this issue contradicts how several command line tools behave, like puppet apply, which does not provide any means to suppress notice message, see: PUP-1126 . In any case, adding a "Syntax OK" message would inconvenience no one, and not having this is a bad surprise for more than a few new users, as I have observed first hand in countless trainings. Adding a flag to suppress the message would be a reasonable approach, too. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t...
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok I am willing to reconsider if there is enough demand for this, and there is a PR with an impl. It is an easier sell if it adds a --verbose flag, but I understand that the issue is when new users just run the command and they don't know about the --verbose flag. Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.c
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Marcelo Carlos commented on an issue Re: puppet parser validate - no output when everything's ok Another reason for this is to allow error messages to be directed to stdout. This is necessary for code linters as the message is used to pinpoint the error. If I run: "puppet parser validate test.pp 2> aa.tx" it works fine, but "puppet parser validate test.pp > aa.tx" doesn't. To implement linters, in most cases we need to use the stdout, hence the need the option to have the message sent to stdout. A --verbose flag for that purpose would be perfect. As a comparison, php in the command line supports such a feature. Regards Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2341) puppet parser validate - no output when everything's ok
Title: Message Title Henrik Lindberg commented on an issue Re: puppet parser validate - no output when everything's ok Marcelo Carlos so, would you like a "Syntax ok" output to stdout ? Add Comment Puppet / PUP-2341 puppet parser validate - no output when everything's ok Running `puppet parser validate init.pp` returns nothing on the command line when there are no errors. Please consider adding a message like "OK" or "No Parse Error" that indicates to the user that the file(s) passed parser validation. This comes up for discussion at almost every fundamentals class I teach, where someone asks "So I see no output, is t... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.