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

Refactor required string dup in 3x runtime converter

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.0.0
    • Compiler, Language
    • Deprecation
    • Hide
      Types and Provider implementations must not mutate the parameter values of a resource. In Puppet 6.0.0 it is more likely that the parameters of a resource will have frozen (i.e. immutable) string values and any type or provider that directly mutates a resource parameter may fail. Before Puppet 6.0.0 every resource attribute was copied to not make application break even if they did mutate. Look for use of {{gsub!}} in your modules and replace logic with non mutating version, or operate on a copy of the value. (All modules authors of modules on the forge having this problem have been notified).
      Show
      Types and Provider implementations must not mutate the parameter values of a resource. In Puppet 6.0.0 it is more likely that the parameters of a resource will have frozen (i.e. immutable) string values and any type or provider that directly mutates a resource parameter may fail. Before Puppet 6.0.0 every resource attribute was copied to not make application break even if they did mutate. Look for use of {{gsub!}} in your modules and replace logic with non mutating version, or operate on a copy of the value. (All modules authors of modules on the forge having this problem have been notified).
    • Needs Assessment

    Description

      The 3x runtime converter must dup all frozen strings as there is user code that mutates (!!!) string parameters. That wastes performance.

      It is not known how much problems it would cause if frozen values were handed to the 3.x resource parameters.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henrik.lindberg Henrik Lindberg
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support