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

type parameters do not honor when default is set to false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Ready for Engineering
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: PUP 6.y
    • Component/s: None
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Acceptance Criteria:
      • parameter defaults of false are honored and properly set
    • Team:
      Coremunity
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      When setting a type parameter to false, previously puppet did not honor this and would treat that parameter as not set, and so would end up being nil. This change ensures that type parameter that defaults to false is correctly set to false rather than nil.
      Show
      When setting a type parameter to false, previously puppet did not honor this and would treat that parameter as not set, and so would end up being nil. This change ensures that type parameter that defaults to false is correctly set to false rather than nil.
    • QA Risk Assessment:
      Needs Assessment

      Description

      In our puppet types, we are able to set defaults for parameters defined for each type. However, if a given parameter defaults to false, the code will take that for falsiness and not include that parameter as set, even though it should be. This originates at https://github.com/puppetlabs/puppet/blob/327b03a9e1ecdc7b925720a4eec59795f4456a56/lib/puppet/type.rb#L834, where value = parameter.default will return false and send us into the else block of that if statement, which removes our parameter from the list of parameters for our given resource.

      This will likely result in some unexpected changes once we fix it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              melissa Melissa Stone
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support