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

make Function unwrap more tolerant

    XMLWordPrintable

    Details

    • Template:
    • Community Contributors:
      cocker-cc
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      Hide
      The "unwrap" function now accepts the "Any" data type. That way component modules like puppetlabs-postgresql can migrate to using Sensitive values while still accepting non-Sensitive values, and not have to special case how the value is unwrapped.
      Show
      The "unwrap" function now accepts the "Any" data type. That way component modules like puppetlabs-postgresql can migrate to using Sensitive values while still accepting non-Sensitive values, and not have to special case how the value is unwrapped.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Desired Behavior:

      Function unwrap() should accept a Parameter of Datatype Any – in particular it should accept a Parameter not of Datatype Sensitive, f.e a simple String.

      Actual Behavior:

      Function unwrap() only accepts a Parameter of Datatype Sensitive.

      Examples: 

      class my_class(
        Variant[String, Sensitive[String]] $password,
      ) {
        # do not care about the actual Datatype of $password
        $password_unsensitive = $password.unwrap
      }
      

       

       

      .

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            cocker.cc Cocker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support