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

Lookup unique merge doesn't deduplicate with a single layer

    XMLWordPrintable

    Details

    • Template:
    • Acceptance Criteria:
      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.
    • Epic Link:
    • Sub-team:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      Agent 2017-06-14
    • Method Found:
      Customer Feedback
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      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.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support