Skip to content

ci(e2e): surface setup/teardown failures in the /run-e2e PR comment#7809

Merged
wozniakjan merged 1 commit into
kedacore:mainfrom
wozniakjan:ci/surface-e2e-bootstrap-teardown-failures
Jun 3, 2026
Merged

ci(e2e): surface setup/teardown failures in the /run-e2e PR comment#7809
wozniakjan merged 1 commit into
kedacore:mainfrom
wozniakjan:ci/surface-e2e-bootstrap-teardown-failures

Conversation

@wozniakjan

Copy link
Copy Markdown
Member

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.

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>
@wozniakjan wozniakjan requested a review from a team as a code owner June 1, 2026 10:09
@wozniakjan wozniakjan requested a review from Copilot June 1, 2026 10:09
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

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:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

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.

@keda-automation keda-automation requested a review from a team June 1, 2026 10:10
@snyk-io

snyk-io Bot commented Jun 1, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/run-all.go
Comment thread .github/workflows/pr-e2e.yml
@wozniakjan wozniakjan enabled auto-merge (squash) June 2, 2026 08:03
@wozniakjan wozniakjan disabled auto-merge June 3, 2026 11:25
@wozniakjan wozniakjan merged commit 58229df into kedacore:main Jun 3, 2026
25 checks passed
shcherbak pushed a commit to shcherbak/keda that referenced this pull request Jun 3, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants