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

Regression: puppet help errors out if any application raises while generating help

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.6.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2016-07-27
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      fix a regression from commit eccd3b which modified puppet to not swallow errors silently, but it caused a regression when a puppet sub-application raises an error

      Description

      PUP-3521 (commit eccd3b modified puppet to not swallow errors silently, but it causes a regression because the result variable is not in scope. To reproduce, modify an app in lib/puppet/application/*.rb to raise an ArgumentError in its help method, then run:

      bundle exec puppet help
      Error: undefined local variable or method `result' for #<Puppet::Interface:0x007fab1b563218>
      ...
      

      The problem line is:

          rescue StandardError
            result << [ "! #{appname}", "! Subcommand unavailable due to error. Check error logs." ]
          end
      

      Although the reproduction steps are contrived, I ran into this problem when I had an application in a module and the application called Puppet.settings.initialize_settings twice, which causes puppet to raise an exception.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  josh Josh Cooper
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: