Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

JSON output doesn't say which object is mis-matched #99

Open
gbonk opened this issue Feb 26, 2020 · 4 comments
Open

JSON output doesn't say which object is mis-matched #99

gbonk opened this issue Feb 26, 2020 · 4 comments

Comments

@gbonk
Copy link

gbonk commented Feb 26, 2020

using the version I cloned from github today ( 2020-02-26 ) and performing a kubediff without the -j flag the output tells me what object is not matched up.

## /source-vars-7hfkggft52 (ConfigMap.v1.)

.metadata.annotations.scm-sha: 'cd59a385c4dadcef8a8e60aaa14fd53fbe58dd6d' != '2d109564509611cdea1a0412953e0a6b829f632a'

But when I add the -j flag, I'm shown there us a mis-match but the object ( source-vars-7hfkggft52 ) isn't mentioned.

{
  "infrastructure.yaml": [
    ".metadata.annotations.scm-sha: 'cd59a385c4dadcef8a8e60aaa14fd53fbe58dd6d' != '2d109564509611cdea1a0412953e0a6b829f632a'"
  ]
}
@imjoseangel
Copy link
Contributor

imjoseangel commented Oct 12, 2021

I vote for a common output in both json and standard like:

{
  "Deployment.v1.apps": [
    {
      "difference": ".spec.replicas: '1' != '3'",
      "name": "default/kubediff-app",
      "path": "tests/e2e/success/k8s-deployment.yaml"
    }
  ]
Deployment.v1.apps

Difference: .spec.replicas: '1' != '3'
Name: default/kubediff-app
Path: tests/e2e/success/k8s-deployment.yaml

@dholbach What do you think?

@dholbach
Copy link
Contributor

A common output sounds great, also if we include all relevant information and make it easy to parse.

I just wonder how we can make it so that we don't change the output format under people's existing scripts.

@imjoseangel
Copy link
Contributor

I think we can keep the one we have and add some flags for extended ones 😄

@dholbach
Copy link
Contributor

Yes, sounds good to me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants