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

make Function unwrap more tolerant

    XMLWordPrintable

Details

    • cocker-cc
    • Enhancement
    • 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.
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support