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

Do not create exceptions for stacktrace information when we know we won't use that information

    Details

    • Template:
    • Team:
      Froyo
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      This release includes improvements to the evaluator, meaning some compilation warnings now take less time to compute.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Release note: Do not create exceptions for stacktrace information

      Currently, when the evaluator runs across a valid warning it will create an exception in the optionally_fail method. That exception is passed into the error handling code (acceptor) that later decides if the issue warrants erring out, printing a warning with a stacktrace, printing a warning without a stacktrace, or ignoring. There is no use in creating exceptions when it is known they will not be used. It should be possible to check the validator/acceptor from optionally_fail and only create the exception when the correct conditions hold.

      ------

      Original note: Currently when the evaluator runs across a valid warning it will create an exception in the `optionally_fail` method. That exception is passed into the error handling code (acceptor) that later decides if the issue warrants erring out, printing a warning with a stacktrace, printing a warning without a stacktrace, or ignoring.

      Creating exceptions/backtraces are expensive in some environments, we should only create them when we know we will print the information they contain. There is no use in creating them when we know we will not use them.

      It should be possible to check the validator/acceptor from optionally_fail and only create the exception when the correct conditions hold.

        Attachments

          Activity

            People

            • Assignee:
              justin Justin Stoller
              Reporter:
              justin Justin Stoller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support