filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.85k stars 1.27k forks source link

Reduce default log verbosity for itests #12565

Open masih opened 1 month ago

masih commented 1 month ago

The log output for itests is so verbose that in cases GitHub Actions UI recommends downloading the log to look at it as it refuses to render it all on the page. They make seeing the cause of failures cumbersome.

rjan90 commented 1 month ago

2024-10-08: From triage meeting:

Abhay-2811 commented 2 weeks ago

@rjan90 @masih Can is there a way I can visualise the issue and pinpoint the places I need to make changes?

masih commented 2 weeks ago

a way I can visualise the issue and pinpoint the places I need to make changes?

Take a look at the output from any one of the itests; example. Or run go test ./itests locally.

There is already some machinery in place to quiet down the logging but the output is still verbose. More specifically, to see what assertion failed in a failing test one has to scroll through a lot of log lines to reach the assertion failure output, because a whole bunch of shut down logs continue to print after test ends.

Ideally, we want the best of both worlds:

The solution discussed with the team and documented by Orjan is to:

  1. redirect logging for each of the itests to a file.
  2. attach the log file as build artefact to the corresponding build.

This way, when a test fails the immediate output is simply the assertion failure. One can then download the full logs from CI to dig further into what caused it.

places I need to make changes?

Abhay-2811 commented 2 weeks ago

Ok I'm on it, you can assign me the issue