From 3c8d7df3319684f74cc06f47a061c8a899d7e96a Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Mon, 7 Sep 2026 16:33:27 +0500 Subject: [PATCH] fix(e2e): stop a failed teardown posting a failed test verdict The teardown ends both merge-gating lanes under `if: always()`, and this branch made it `exit "$cleanup_rc"`. So a `docker compose down` hiccup, a busy zpool or a failed rmdir after a fully passing suite posts the required "E2E Tests" status as a failure, and nothing downstream can tell that apart from a test that actually broke. The runner is discarded when the job ends, so there is no next run for the strictness to protect; a reused host is a developer machine, and an annotation serves it. Loud, not fatal. Two comments described mechanisms that are gone. The breakpoint step still explained reading a soft-red output that this branch removed, so a maintainer would go looking for it; the node-join deadline now fails its suite like any other, which is what makes `failure()` sufficient. The build-talos header still described building the nocloud disk and e2e needing it, when the job builds neither and the container lane downloads no disk -- the profile is compiled by nightly and by the tag build's `make assets` instead, and what a PR still compiles is installer.yaml, which shares every input with it bar the platform and output format. And the platform-package override now states its consequence for both packages it replaces, not only for CDI: the merge-gating lane exercises neither the shipped CDI default nor `drbd.enabled: true`. Adapted for release-1.6: the gate here is the "E2E Tests" job itself rather than a commit status, so the teardown comment says so; the breakpoint step never had the soft-red condition on this branch and is left alone; the build-talos header names only the tag build, since nightly.yaml does not run from this branch; and the e2e-fork.yaml and platform-packages hunks have nothing to apply to. Assisted-By: LLM (cherry picked from commit 62f2234aeaf924f7f5b918cbaa9440285c243977) Signed-off-by: Myasnikov Daniil --- .github/workflows/pull-requests.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index a6fdb0fce..ecc7a5a68 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -318,9 +318,14 @@ jobs: path: _out/fragments/${{ steps.frag.outputs.safe }}.patch if-no-files-found: error - # Talos is its own leg: the nocloud disk and the installer tarball are heavy - # and shared through _out/assets, so the talos image and the disk are built in - # one job. Always runs on non-docs PRs — e2e needs the disk regardless of the + # Talos is its own leg: the installer tarball is heavy and the talos image is + # built from it, so both live in one job. No nocloud disk is built here any + # more, and e2e no longer downloads one -- the container lane boots the Talos + # image directly. `images/talos/profiles/nocloud.yaml` is therefore compiled + # by the tag build's `make assets` rather than per PR; what a PR still + # compiles is installer.yaml, which shares every input with it bar the + # platform and the output format. Always runs on non-docs PRs, because the + # patch fragment and the installer chain need it regardless of the # per-package matrix scope. build-talos: name: Build Talos @@ -974,10 +979,19 @@ jobs: - name: Tear down sandbox if: always() run: | + # Loud, but never the job's verdict. A failed teardown means a dirty + # host, and this runner is discarded after the job, so there is no next + # run to protect -- while failing the job here turns the required + # "E2E Tests" check red in a way no reader can tell apart from a real + # failure. The annotation is what a reused host (a developer machine) + # needs; `delete-cluster-container` returning non-zero is not evidence + # about the product. cleanup_rc=0 make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete-cluster-container || cleanup_rc=$? make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete || true - exit "$cleanup_rc" + if [ "$cleanup_rc" -ne 0 ]; then + echo "::error title=sandbox teardown::teardown exited $cleanup_rc; the host may hold a stale compose project or zpool" + fi - name: Remove workspace if: always()