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

feat: improve analyze command #394

Closed

Conversation

rakshitgondwal
Copy link
Member

@rakshitgondwal rakshitgondwal commented May 10, 2023

Closes #332

📑 Description

Made the following changes-

  • Added \n between yellow sections and the top of the yellow GPT response for better readability.
  • Made the index start from 1 instead 0 for the results.
  • Added index for the errors too.
  • Parentheses would be omitted if the value of result.ParentObject would be empty.

Here's a reference image for these issues-
234235472-8dc723bd-1dea-4666-b99a-630605c54be4

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
@rakshitgondwal rakshitgondwal requested review from a team as code owners May 10, 2023 16:04
@rakshitgondwal
Copy link
Member Author

There were two more changes suggested-

  • Hide the server could not find the requested resource errors by default (enable in verbose or details mode)
  • Hide internal cache related errors

but I am not being able to get around these. Can I get some help here?

@matthisholleville
Copy link
Contributor

I pushed a commit quickly, I think it can inspire you for the rework of the logs concerning the cache : main...matthisholleville:k8sgpt:feat/rework-cache-log

@AlexsJones
Copy link
Member

Made the index start from 1 instead 0.

👀

@rakshitgondwal
Copy link
Member Author

Made the index start from 1 instead 0.

eyes

For the results*

@rakshitgondwal
Copy link
Member Author

Hey @matthisholleville
From what I can understand, after going through your commit, we are now handling the cache errors in the ai package itself, rather than handling it in file_based.go but how can we hide the internal system errors?
I was thinking of just returning false from the file_based.go but that won't be a good idea, or would it be?

@matthisholleville
Copy link
Contributor

I think we should add a global argument to handle the verbosity of these logs

@rakshitgondwal
Copy link
Member Author

I think we should add a global argument to handle the verbosity of these logs

Ohh something like if a user provides --versbose then we print the logs else we just return something like error while testing if cache key exists, use --verbose to get more details

@AlexsJones
Copy link
Member

Is this ready for review?

@rakshitgondwal
Copy link
Member Author

Is this ready for review?

Nope, still have this question that do we introduce a --verbose flag to print the logs? I think Matthis is busy so can you help me out here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Some tweaks for the terminal output for readability
3 participants