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

BUG: Change identification - order changed #376

Open
YashPatil0706 opened this issue Jul 17, 2024 · 1 comment
Open

BUG: Change identification - order changed #376

YashPatil0706 opened this issue Jul 17, 2024 · 1 comment

Comments

@YashPatil0706
Copy link

YashPatil0706 commented Jul 17, 2024

Dyff has a bug where it doesn't identify the value changed, instead it shows an order change

app1.yaml:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: a
  annotations:
    a: "2"

app2.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: a
  annotations:
    a: "3"

output:

metadata.annotations.a
  ± value change
    - 2
    + 3

Now if I change metadata.name :

app1.yaml:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: a
  annotations:
    a: "2"

app2.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: b
  annotations:
    a: "3"

output:

(file level)
  - one document removed:       ---                 ⇆ order changed
    ---                         apiVersion: v1        - v1/ConfigMap/a
    apiVersion: v1              kind: ConfigMap       + v1/ConfigMap/b
    kind: ConfigMap             metadata:
    metadata:                   │ name: b
    │ name: a                   │ annotations:
    │ annotations:              │ │ a: 3
    │ │ a: 2

Expected output:

metadata.annotations.a
  ± value change
    - 2
    + 3
    
metadata.name
  ± value change
    - a
    + b
@cbcheck24
Copy link

Yeah same issue here, its refusing to actually diff two files that have minor differences and just says order changed + one document removed

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

2 participants