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

Lookup unique merge doesn't deduplicate with a single layer

    XMLWordPrintable

Details

    • Hide

      Running lookup with only a single layer will show me the values with no duplicates.

      Show
      Running lookup with only a single layer will show me the values with no duplicates.
    • Agent
    • 1
    • Agent 2017-06-14
    • Customer Feedback
    • Bug Fix
    • Hide
      When performing a lookup with merge strategy {{unique}} on an array value, the array could end up containing duplicates if it was never merged with another array during the lookup. This is now changed so that the result for a lookup with {{unique}} merge always results in a unique set of values.
      Show
      When performing a lookup with merge strategy {{unique}} on an array value, the array could end up containing duplicates if it was never merged with another array during the lookup. This is now changed so that the result for a lookup with {{unique}} merge always results in a unique set of values.
    • No Action
    • Check in includes tests for the change

    Description

      The lookup function with a unique merge doesn't seem to deduplicate when there is only one layer of Hiera that the key appears in.

      For example, when I run this:

      puppet lookup people::tags --merge unique
      ---
      - syseng
      - syseng-identity_dev
      - identity
      - identity-dev
      - identity
      - identity-identity_dev
      

      If I add the key with identity to another layer I get

      ---
      - identity
      - syseng
      - syseng-identity_dev
      - identity-dev
      - identity-identity_dev
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbeck Jarryd Beck
              Eric Delaney Eric Delaney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support