-
Notifications
You must be signed in to change notification settings - Fork 612
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
question: -o json is not returning an entire json structure for some cases #325
Comments
Thank you for your feedback. You are right, it would be interesting to rework the output format, especially in case of errors. Maybe you would like to contribute? |
Hi, I can help contribute to this if that's okay. Would the scope be the output mentioned in this issue only, or across the codebase? |
Sure ! Go ahead ! |
How are you getting on with this @PalAditya ? |
@AlexsJones - Thanks for asking. Actually, the refactor seems to be more complex than I initially thought, so it won't be quick and my vacation finishes today as well. I don't think I will be able to contribute effectively to this at this point, so please feel unassign me as of now so that someone else can pick it up if they want. |
I'll start working on it tomorrow. |
Checklist:
Subject of the issue
Run the comand
./k8sgpt analyze --explain -o json
is returning json and text (not just json)Your environment
Local macbook M2, MacOS, docker, gcp cluster
v1.26.1
Mac OS
v0.2.4
Steps to reproduce
Create a cluster in gcp
Run analyze using
-o json
optionExpected behaviour
The system should return a json estructure
Actual behaviour
the system is returning, text lines out of json broking the json dumps
Additional context / screenshots
The problem is here
k8sgpt/pkg/analyzer/service.go
Line 50 in c3cc413
The system is returning the line with the text instead add in the failure array together other failures, the byte stream returned both text and the json so is impossible to convert in a right key value structure
The text was updated successfully, but these errors were encountered: