-
Notifications
You must be signed in to change notification settings - Fork 649
[Tigron]: Testing logs user experience #4080
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
Conversation
Here is the text version of that same failure, copy-pasted from my terminal.
|
0ed97c0
to
a3d981b
Compare
Thanks, the output looks better now |
f7923d5
to
d6b0a21
Compare
NOTE Once we are ready to merge, I will yank out that last commit. |
@@ -5,8 +5,9 @@ go 1.23.0 | |||
require ( | |||
github.com/creack/pty v1.1.24 | |||
go.uber.org/goleak v1.3.0 | |||
golang.org/x/sync v0.12.0 | |||
golang.org/x/sync v0.13.0 |
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.
go mod tidy seem to have brought the update in (maybe because of x/text
).
Anyhow, this is fine.
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.
Thanks
19a1275
to
7ded8fe
Compare
Signed-off-by: apostasie <[email protected]>
The extra info parameter makes it so that all command debugging information is printed-out for every assert. Since command debugging information will now be logged separately, this is now un-necessary. A later PR will change the API and remove the parameter entirely from test.Comparator. Signed-off-by: apostasie <[email protected]>
Signed-off-by: apostasie <[email protected]>
Finishing prior effort to make test run easier to debug, this introduces a number of changes to the output: - high-contrast emojis to make it easier to spot relevant sections - 2 columns table formatting for commands informations - better spacing - lifecycle sections (cleanup, setup, run) - clearly called out assertive output Signed-off-by: apostasie <[email protected]>
7ded8fe
to
488e1e7
Compare
Thanks @AkihiroSuda I think this might require minor adjustments in the future as we debug more with this in, but let's see about that later on. |
Kube failure I have seen quite a few times. Rootless failure is again #4046 |
<!> Blocked by <!>:
This PR focuses specifically on enhancing the human experience of looking at this:
I do spend a lot of time debugging on the CI, or locally, and here are my issues with this:
It is all packed, and very hard to distinguish one line from the other - everything visually stands at the same level - headers, context information, failure, file and line numbers.
This here is actually a simple failure - for more complex ones, it literally takes minutes of squinting to figure out where is the command that was run, and more time to figure out what is the "failure".
More often than not, the failure is really cryptic, as in
false is not true
.Yeah, no shit Sherlock.
So, you do have to context switch to an IDE, find the file, go to that line number, try to understand the test, read the tea leaves, etc.
Also, since the filename is shown as basename only, I regularly open the wrong (identically named) one.
Context is hard to figure out too.
There are empty sections ("Setup") - did anything run in there? or not? if nothing ran, why show the section?
If something ran, what was it so that I can reproduce the context before trying to debug the command.
Env
is a can of worms on its own - useful, but also very loud.This PR would like to propose we address all these issues:
actual
, what wasexpected
, what did it all mean?I do appreciate that everyone has their own tastes and preferences when it comes to visual things, so, I do not expect that we are going to agree on every detail, and we will have to settle on something.
The important part here is to come up with something that objectively addresses these issues - then we can bikeshed all we want on pink vs. green :-) (or I will make the output configurable so that different projects can pick their poison).
I truly believe very few people engage with the CI failures not because they are lazy, but because it looks like a train accident.
PLEASE NOTE THAT THIS PR CODE IS NOT READY FOR REVIEW.What is ready for review and discussion right now is the visual end-result (see next comment).