Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Andrey Galkin commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML > created PUP-8547 for the upstream problems Looks good. Thanks. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Henrik Lindberg Release Notes Summary: Earlier if a yaml data file was read by hiera and the file did not result in a hash or completely empty result, a warning was issued. Now, if {{\--strict=error}} hiera will instead error if the file was read by the built in yaml or eyaml backend functions. If {{\--strict}} is {{warning}} or {{off}} a warning is issued as before. Note that Ruby's YAML parser does not fully comply with the YAML spec and some faulty YAML files may still be loaded with strange results instead of errors. See PUP-8547. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML Andrey Galkin created PUP-8547 for the upstream problems Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML Well, now puppet will fail if the YAML implementation says it is invalid YAML, or if the returned result is not a hash. We cannot do more in puppet (short of replacing the YAML parser with a better YAML parser). As you point out Andrey Galkin - this is an upstream problem. I think the right thing to do is to create a new ticket "Ruby's yaml is not compliant with YAML spec wrt to errors" (or somewuch) and relate this ticket to it. This ticket helps, but it cannot solve the underlying problem. Meanwhile, the latest Python (PyYaml) implementation can be used to validate - it found the new sample error for example. One online version here: http://yaml-online-parser.appspot.com/ Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Andrey Galkin commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML > The best practice is to use a validator for YAML that gives the appropriate errors/warnings. Not sure it is desirable to do this at runtime as it would increase the cost of reading YAML quite dramatically. The performance problem is solvable by proper YAML parser instead of definitely broken Ruby's default one. There is not need to introduces linter overhead. And in any case, you can do Hiera static file caching the same way you do catalog or ruby file caching. It should even increase performance overall at minor cost of extra memory used. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Andrey Galkin commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML Guys, I believe you fix is incomplete as it does not protect from another case below. I would still open this ticket blocked by a feature request: strict YAML validation. It's definitely not resolved. --- #someobj: a: 1 b: 2 somevar: 1 Ruby results in: --- a: 1 b: 2 Add Comment
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Josh Cooper updated an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Josh Cooper Team: Platform Core Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Josh Cooper updated an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Josh Cooper Sub-team: Language Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg assigned an issue to Unassigned Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Henrik Lindberg Assignee: Henrik Lindberg Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Merged to 5.5.x at 1129834 Change By: Henrik Lindberg Release Notes Summary: Earlier if a yaml data file was read by hiera and the file did not result in a hash or completely empty result, a warning was issued. Now, if {{\--strict=error}} hiera will instead error if the file was read by the built in yaml or eyaml backend functions. If {{\--strict}} is {{warning}} or {{off}} a warning is issued as before. Release Notes: Bug Fix Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Henrik Lindberg Fix Version/s: PUP 5.5.0 Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Thomas Hallgren assigned an issue to Henrik Lindberg Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Thomas Hallgren Assignee: Thomas Hallgren Henrik Lindberg Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Henrik Lindberg commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML The best practice is to use a validator for YAML that gives the appropriate errors/warnings. Not sure it is desirable to do this at runtime as it would increase the cost of reading YAML quite dramatically. Since a hash is expected and it gets an array - this could be placed under the control of the {--strict}} flag. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Andrey Galkin commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML I see you pain with broken YAML loading in Ruby. In other implementations, the original YAML snippet from description fails to load. The problem can be reported to upstream. However, some validation in Puppet is desired. Log entry is not really enough. Broken YAML should fail the same way as invalid Puppet manifest would fail. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Thomas Hallgren commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML Duplicates are silently ignored by the Ruby YAML parser although they shouldn't be according to spec: --- somevar: 1 somevar: 2 In Ruby, the last entry wins and a lookup for "somevar" returns the integer 2. Excerpt from the YAML spec: JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be. Technically, YAML therefore complies with the JSON spec, choosing to treat duplicates as an error. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Thomas Hallgren commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML While the sample yaml doesn't hard fail, it isn't silently ignored either. The following warning is printed: file does not contain a valid yaml hash" Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Thomas Hallgren commented on PUP-8541 Re: Hiera lookup must hard fail on invalid YAML This is somewhat problematic given that the YAML#load doesn't detect the invalid content. The sample yaml given in the description of this thicket loads ok and produces: ["cls1", "cls2"] Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- 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 https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8541) Hiera lookup must hard fail on invalid YAML
Title: Message Title Thomas Hallgren moved an issue Puppet / PUP-8541 Hiera lookup must hard fail on invalid YAML Change By: Thomas Hallgren Affects Version/s: HI 3.4.2 Component/s: PE Component/s: Community Component/s: PE Component/s: Community Key: HI PUP - 597 8541 Project: Hiera Puppet Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)