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

Reduce default log verbosity for itests #12565

Open
2 tasks
masih opened this issue Oct 8, 2024 · 4 comments
Open
2 tasks

Reduce default log verbosity for itests #12565

masih opened this issue Oct 8, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@masih
Copy link
Member

masih commented Oct 8, 2024

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.

  • Change the default log levels for itests to print nothing.
  • Add utilities to easily enable verbose logging manually for failing tests.
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Oct 8, 2024
@masih masih added the good first issue Good for newcomers label Oct 8, 2024
@rjan90 rjan90 moved this from 📌 Triage to 🐱 Todo in FilOz Oct 8, 2024
@rjan90
Copy link
Contributor

rjan90 commented Oct 8, 2024

2024-10-08:
From triage meeting:

  • Ideally on failure get debug logs, else print nothing
  • Dump all logs to a file as a test artifact that way if there is a failure it can still be seen but it doesn't clutter standard output in GitHub UI. (This was the recommended approach in the UI.)

@Abhay-2811
Copy link

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

@masih
Copy link
Member Author

masih commented Oct 29, 2024

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:

  • not be bothered by verbose logging if tests pass.
  • have immediate access to it if the test fails without having to re-run it.

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?

  • Look at setting appropriate environment variables to redirect the logs to a file. You may need to change test kit logging to achieve this but ideally environment variables alone should be enough.
  • modify the itest CI worlfow to archive log files as build artifact when the test fails.

@Abhay-2811
Copy link

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

@rjan90 rjan90 moved this from 🐱 Todo to ⌨️ In Progress in FilOz Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: ⌨️ In Progress
Development

No branches or pull requests

3 participants