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

Missing document separators when Kubernetes documents have been added/removed #344

Open
ajhall opened this issue Feb 29, 2024 · 0 comments

Comments

@ajhall
Copy link

ajhall commented Feb 29, 2024

When comparing a list of Kubernetes manifests against each other and some documents have been added or removed, there are no document separators in the "documents removed"/"documents added" output, so all the manifests run together.

Example:

# a.yaml
---
apiVersion: v1
kind: Namespace
metadata:
  name: a
---
apiVersion: v1
kind: Namespace
metadata:
  name: b
# x.yaml
---
apiVersion: v1
kind: Namespace
metadata:
  name: x
---
apiVersion: v1
kind: Namespace
metadata:
  name: y
$ dyff between -ib a.yaml x.yaml

(file level)
  - two documents removed:       ---
    ---                          apiVersion: v1
    apiVersion: v1               kind: Namespace
    kind: Namespace              metadata:
    metadata:                    │ name: x
    │ name: a                    apiVersion: v1
    apiVersion: v1               kind: Namespace
    kind: Namespace              metadata:
    metadata:                    │ name: y
    │ name: b

I would expect it to look something like this instead:

  - two documents removed:       ---
    ---                          apiVersion: v1
    apiVersion: v1               kind: Namespace
    kind: Namespace              metadata:
    metadata:                    │ name: x
    │ name: a                    ---
    ---                          apiVersion: v1
    apiVersion: v1               kind: Namespace
    kind: Namespace              metadata:
    metadata:                    │ name: y
    │ name: b
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