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

Make error message for multiple validation errors actionable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.3.2
    • Fix Version/s: PUP 4.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      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
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-02-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      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.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      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

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support