ci(e2e): surface setup/teardown failures in the /run-e2e PR comment#7809
Conversation
Setup and teardown short-circuit run-all.go with os.Exit(1) before evaluateExecution runs, so dumpResults never writes passed.txt/failed.txt. On such failures the PR e2e comment showed no detail at all (only the reaction emoji), forcing maintainers into the raw logs to learn that the cluster never bootstrapped or that cleanup leaked resources. run-all.go now writes setup_and_teardown.txt to E2E_RESULTS_DIR when the setup or teardown step fails, naming the step, its test file, and the failing sub-test(s) parsed from the output (e.g. "setup failed (tests/utils/setup_test.go): TestSetUpStrimzi"). It is written explicitly before each early os.Exit (os.Exit skips deferred dumps) and only on failure, so its existence signals a setup/teardown failure. The runner stays output-format agnostic; rendering lives in the workflow. pr-e2e.yml renders a separate, expanded "setup / teardown failures" block (with a headline) only when setup_and_teardown.txt is non-empty, above the existing passed/failed blocks, and posts the comment when any of the three files is present. The passed/failed blocks stay single-purpose. Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
Enhances the /run-e2e PR comment reporting so that infrastructure failures during E2E setup/teardown (not just test failures) are surfaced to reviewers, addressing gaps from #7760.
Changes:
- Record setup/teardown failures from the E2E runner into an additional results file (
setup_and_teardown.txt). - Extend the PR comment body builder to render a dedicated “setup / teardown failures” block when such failures occurred.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/run-all.go |
Writes setup/teardown failure summaries (incl. failed subtests) into E2E_RESULTS_DIR/setup_and_teardown.txt; adjusts cleanup to return TestResult. |
.github/workflows/pr-e2e.yml |
Includes setup_and_teardown.txt in the “should post” decision and renders an infra-failure details block in the PR comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…edacore#7809) Setup and teardown short-circuit run-all.go with os.Exit(1) before evaluateExecution runs, so dumpResults never writes passed.txt/failed.txt. On such failures the PR e2e comment showed no detail at all (only the reaction emoji), forcing maintainers into the raw logs to learn that the cluster never bootstrapped or that cleanup leaked resources. run-all.go now writes setup_and_teardown.txt to E2E_RESULTS_DIR when the setup or teardown step fails, naming the step, its test file, and the failing sub-test(s) parsed from the output (e.g. "setup failed (tests/utils/setup_test.go): TestSetUpStrimzi"). It is written explicitly before each early os.Exit (os.Exit skips deferred dumps) and only on failure, so its existence signals a setup/teardown failure. The runner stays output-format agnostic; rendering lives in the workflow. pr-e2e.yml renders a separate, expanded "setup / teardown failures" block (with a headline) only when setup_and_teardown.txt is non-empty, above the existing passed/failed blocks, and posts the comment when any of the three files is present. The passed/failed blocks stay single-purpose. Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Yurii Shcherbak <ju.shcherbak@gmail.com>
followup to #7760, which only captured failures from e2e tests, but when e2e infra setup or teardown failed (looking at you strimzi operator), these errors were not surfaced. This PR adds optional block, similar to the failed / succeeded blocks, only rendered if setup or teardown failed.