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

Replace check for deprecated types in Puppet::Resource with more robust method method of emitting deprecation warnings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.7.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      It was recently discovered that the check for deprecated resource types and type parameters in Puppet::Resource is contributing to a Puppet memory leak. The check creates a cache of non-deprecated types, and for types not in the cache calls the `deprecate_params` method to emit a warning if warranted.

      • The code in question resides in lib/puppet/resource.rb, lines 190 and 245 - 251

      It should be noted that this mechanism was put into place to create deprecation warnings for the cron purge parameter and was merged at commit 7d7b7017. That warning was removed as part of the Puppet 4 code removal effort at 7ce59ba3.

      As this is causing memory issues, we should remove it and implement a more robust way of deprecating resource types or type parameters. On the puppet-dev mailing list, Andy suggested:

      "Henrik and I discussed it some this morning too. He pointed out that there is a much better way to achieve these goals than to have behavior on Puppet::Resource. Instead we should just emit the warnings at some point after the catalog is complete, but is being validated. There are several passes at the end of the compile step where that would fit in. I think for puppet 4, we can just go ahead and remove the current implementation."

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              whopper William Hopper
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support