-
Notifications
You must be signed in to change notification settings - Fork 101
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
Better logging for init #934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We desperately need fancy Unicode characters in the output! And not only here, but when installing instances too! And in the plan status output! Let the ✓
be an inspiration to you ;)
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
pkg/kudoctl/cmd/init/manager.go
Outdated
clog.Printf("✓ installing crds") | ||
if err := installCrds(client.ExtClient); err != nil { | ||
return err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, that I think about it, it should be the other way around ;)
clog.Printf("✓ installing crds") | |
if err := installCrds(client.ExtClient); err != nil { | |
return err | |
} | |
if err := installCrds(client.ExtClient); err != nil { | |
return fmt.Errorf("❌failed to install CRDs: %w", err) | |
} | |
clog.Printf("✅ installed crds") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the others too ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer @zen-dog graphics... and I do not like graphics in the error messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 so do we want to add the cross there or not? I am not sure I understand the conclusion of that sentence
pkg/kudoctl/cmd/init/manager.go
Outdated
@@ -59,19 +59,19 @@ func NewOptions(v string) Options { | |||
// Install uses Kubernetes client to install KUDO. | |||
func Install(client *kube.Client, opts Options, crdOnly bool) error { | |||
|
|||
clog.V(4).Printf("installing crds") | |||
clog.Printf("✓ installing crds") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I prefer a more quiet cli... I really preferred the verbosity at 4 rather than at 0. I do like the unicode chars!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unicode ftw!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually find it weird to run a command and have no feedback on what actually happened and if something happened. I think Zain or some of the SEs complained about it as well (that they don't have any feedback after the command is run). So I think we need to have at least a very short output for every command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some additional thoughts...
the example output is now:
$KUDO_HOME has been configured at /Users/alenavarkockova/.kudo
installing crds
installing prereqs
installing kudo controller
when verbosity was 4... these were debugging messages to help potentially diagnose an issue. now at verbosity of 0 they are standard cli output... because of that... if we keep verbosity at 0 I think:
- we need to case correctly... like CRDs and KUDO
- I'm questioning abbrev... "prereq" has multiple issues... for one we should spell it out.. but it also begs the question what is that.
I don't have a strong opinion here. I do agree with @kensipe that we should expand the pronunciation and make those for humans. I do like longer error messages that are more descriptive and try to help people in general. See Elm and Rust's errors for where I'm thinking there - obviously this is not that PR. IMO, Everything at log level 0 / printed by default should be non-expert human oriented and verbosity levels of that should be written for developers and experts. |
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
Co-Authored-By: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
I am going to merge this. We can always iterate on master |
What this PR does / why we need it:
Right now when you run init and you're initializing the server side as well as local environment, the only thing the command prints out is that local was initialized. This PR adds more logging to make it obvious that server side is being initialized as well.
This is output of init before this change
After