-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
test: Improve logging of errors that must be investigated #12598
test: Improve logging of errors that must be investigated #12598
Conversation
Only print the unique logs, and ensure they're printed not only to the checker output but also to the regular ginkgo output. Signed-off-by: Joe Stringer <joe@cilium.io>
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.
Nice!
test-me-please |
failures := make([]string, 0, len(uniqueFailures)) | ||
for f, c := range uniqueFailures { | ||
failures = append(failures, f) | ||
fmt.Fprintf(CheckLogs, "⚠️ Found %q in logs %d times\n", f, c) |
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.
Bikeshedding nit: does the ⚠️
char serve any purpose in the log msg?;-)
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.
It's been a while since I even thought about it but the idea is to highlight this concern in the output. It certainly gives these particular messages a certain aesthetic, breaking up the flow of the log output and helps to highlights this output (though these days there's always false positives due to certain logs triggered by our CI system :( )
Only print the unique logs, and ensure they're printed not only to the
checker output but also to the regular ginkgo output.