Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6006

Make error message for multiple validation errors actionable

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 4.3.2
    • PUP 4.10.0
    • None
    • None
    • Hide

      That the message given when there are multiple errors hints the user that:

      • errors come from language validation
      • output have been logged
      • it is possible to change a setting to stop on first error
      Show
      That the message given when there are multiple errors hints the user that: errors come from language validation output have been logged it is possible to change a setting to stop on first error
    • Puppet Developer Experience
    • 1
    • PDE 2017-02-08
    • Bug Fix
    • Hide
      The error message when the language validation finds multiple problems was hard to understand in terms of what the underlying cause could be. Now it points out it is language validation and states that more info is in the logs. It also suggests that --max_errors=1 may be useful in this situation.
      Show
      The error message when the language validation finds multiple problems was hard to understand in terms of what the underlying cause could be. Now it points out it is language validation and states that more info is in the logs. It also suggests that --max_errors=1 may be useful in this situation.
    • No Action
    • covered by unit tests; more verbose error messages

    Description

      During rspec tests while migrating from Puppet 3 to Puppet 4, I encountered an error that was non-obvious to me.

      24) wiki Set common params should contain Firewall[105 searchd]
           Failure/Error: it { is_expected.to contain_firewall('105 searchd') }
           Puppet::ParseErrorWithIssue:
             Found 2 errors. Giving up in <PATH>/puppet/controlrepo/dist/wiki/spec/fixtures/modules/wiki/manifests/init.pp on node chi-build04.mss.local
      

      The error message that I focused on was "Found 2 errors. Giving up in ..." It doesn't say, or show, the errors. Eventually I determined this came from https://github.com/puppetlabs/puppet/blob/master/lib/puppet/pops/issue_reporter.rb#L72 due to some help from Henrik on IRC, at which point I realized I was running "puppet parser validate" against the file instead of "bundle exec puppet parser validate" (the node is still on v3.7 as we're not migrating yet).

      I feel an error message such as "Found # errors during parser validation" would be an improvement here. If the actual errors can be floated up to rspec-puppet even better.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rnelson0@gmail.com Rob Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support