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

Align JSON return values on empty response #39

Closed
yonahd opened this issue Aug 30, 2023 · 1 comment · Fixed by #46
Closed

Align JSON return values on empty response #39

yonahd opened this issue Aug 30, 2023 · 1 comment · Fixed by #46
Labels
bug Something isn't working
Milestone

Comments

@yonahd
Copy link
Owner

yonahd commented Aug 30, 2023

Describe the bug
When running kor with --output json we get different responses from resources
e.g.

{
  "default": {
    "ConfigMap": [],
    "Deployment": null,
    "Hpa": null,
    "Ingress": [],
    "Pvc": [],
    "Role": [],
    "Secret": [],
    "Service": null,
    "ServiceAccount": [],
    "Statefulset": null
  }
}

Expected behavior
All resources should return []

OS version, architecture and kor version
e.g. Darwin x86_64
Kor version: 0.1.9

@yonahd yonahd added the bug Something isn't working label Aug 30, 2023
@yonahd
Copy link
Owner Author

yonahd commented Aug 30, 2023

This is due to the usage of CalculateResourceDifference which will return [] on empty result

@yonahd yonahd added this to the v0.2.0 milestone Aug 30, 2023
@yonahd yonahd mentioned this issue Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant