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

regression: explicit undef cannot be used in create_resources

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.6.1
    • Component/s: None
    • Labels:
    • Template:
    • Story Points:
      2
    • Sprint:
      Language 2016-08-24
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      A regression made it impossible to give an attribute as {{undef}} when there is no default value expression for a resource parameter and using {{create_resources}} to create the resource. There was no regression when doing the same from a manifest directly.
      Show
      A regression made it impossible to give an attribute as {{undef}} when there is no default value expression for a resource parameter and using {{create_resources}} to create the resource. There was no regression when doing the same from a manifest directly.

      Description

      The following code works when evaluated from a manifest:

      puppet apply -e 'define foo($foo) {} foo { "FOO": foo => undef }'
      

      But not when done using create_resources.

      The rule puppet should use is: if undef is given then use the default value if one exists, otherwise set an explicit undef. Now the create_resources function simply filters out all undef values. (If simply kept, there are other problems since relationships cannot handle undef entries.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  phong Phong Ly
                  Reporter:
                  henrik.lindberg Henrik Lindberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: