Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate keys in map lead to dyff finding a diff even if there's not #354

Open
Alan-pad opened this issue Mar 21, 2024 · 0 comments
Open

Comments

@Alan-pad
Copy link

Hey !

Context

We're using dyff to check the difference between 2 rendered Helm template. With Helm you can end up with duplicate keys in a map if for some reason you set some default value in a map that can later be overriden through user input, those duplicate keys lead to dyff finding a diff where there should be none.

Issue

Rendered Helm file

# test.yaml
test:
  element1: test
  element1: test2

Dyff command

dyff between test.yaml test.yaml

Dyff result

     _        __  __
   _| |_   _ / _|/ _|  between test.yaml
 / _' | | | | |_| |_       and test.yaml
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned one difference
        |___/

test.element1
  ± value change
    - test2
    + test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant