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

Deep merge options cannot be passed as options map.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-03-04, Language 2015-03-18

      Description

      When using lookup, the merge strategy can be passed as a map with a 'strategy' key and additional options. This map is type validated and everything works fine for the 'unique' and 'hash' strategies but it fails when using the 'deep' merge strategy since it allows additional options with varying element types (booleans in particular).

      The reason this fails is that the type validation incorrectly uses 'infer()' on the given map (which produces a Hash type) instead of 'infer_set()' (which produces a Struct type). The assignable? then fails since it tries to verify all elements of the required type using the common element type of the inferred Hash.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                thomas.hallgren Thomas Hallgren
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support