prometheus-operator / prometheus-operator

Prometheus Operator creates/configures/manages Prometheus clusters atop Kubernetes
https://prometheus-operator.dev
Apache License 2.0
9.06k stars 3.7k forks source link

Store debug information from e2e tests on disk and upload to artifacts #6973

Open simonpasquier opened 2 weeks ago

simonpasquier commented 2 weeks ago

Component(s)

No response

What is missing? Please describe.

6960 added the capability to collect troubleshooting information when e2e test cases fail. Right now the information is dumped to the standard output which can be hard to navigate. Instead it would useful to store the data on disk and upload to GitHub artifacts.

Describe alternatives you've considered.

No response

Environment Information.

Environment

Kubernetes Version: Prometheus-Operator Version:

slashpai commented 2 weeks ago

IIUC this can be done easily with https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow#uploading-build-and-test-artifacts, may be we can log the output of test to /tmp and then use that file to upload to artifacts with a retention period

slashpai commented 2 weeks ago

more option explained in https://github.com/actions/upload-artifact

simonpasquier commented 2 weeks ago

To be more explicit (since we've discussed offline with @slashpai), my idea was that all debug info should be stored to a temp directory (with each sub-test debug into its own subdir) instead of being printed out to stdout because the debug info is massive and makes it harder to read the test.

The debugging workflow would look like:

  1. open the GitHub action UI to look for the failed test.
  2. download the test artifact.
  3. look for debug info pertaining to the failed test.

I expect that we had more and more collected information over time.