Skip to content

Commit 62f2234

Browse files
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`. Signed-off-by: Myasnikov Daniil <[email protected]> Assisted-By: LLM
1 parent 8456fac commit 62f2234

3 files changed

Lines changed: 37 additions & 15 deletions

File tree

‎.github/workflows/e2e-fork.yaml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,16 @@ jobs:
758758
- name: Tear down sandbox
759759
if: always()
760760
run: |
761+
# Annotated, not fatal: same reasoning as the in-tree lane. The runner
762+
# is discarded after the job, so a dirty host has no next tenant, and
763+
# failing here would post the required "E2E Tests" status as a failure
764+
# indistinguishable from a real one.
761765
cleanup_rc=0
762766
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete-cluster-container || cleanup_rc=$?
763767
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete || true
764-
exit "$cleanup_rc"
768+
if [ "$cleanup_rc" -ne 0 ]; then
769+
echo "::error title=sandbox teardown::teardown exited $cleanup_rc; the host may hold a stale compose project or zpool"
770+
fi
765771
766772
# Flip the pending "E2E Tests" commit status posted by `resolve` to its
767773
# terminal state. Runs on failure too, so a failed publish or e2e turns the

‎.github/workflows/pull-requests.yaml‎

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,14 @@ jobs:
444444
path: _out/oci/*.oci.tar
445445
if-no-files-found: error
446446

447-
# Talos is its own leg: the nocloud disk and the installer tarball are heavy
448-
# and shared through _out/assets, so the talos image and the disk are built in
449-
# one job. Always runs on non-docs PRs — e2e needs the disk regardless of the
447+
# Talos is its own leg: the installer tarball is heavy and the talos image is
448+
# built from it, so both live in one job. No nocloud disk is built here any
449+
# more, and e2e no longer downloads one -- the container lane boots the Talos
450+
# image directly. `images/talos/profiles/nocloud.yaml` is therefore compiled
451+
# by nightly.yaml and by the tag build's `make assets` rather than per PR;
452+
# what a PR still compiles is installer.yaml, which shares every input with it
453+
# bar the platform and the output format. Always runs on non-docs PRs, because
454+
# the patch fragment and the installer chain need it regardless of the
450455
# per-package matrix scope.
451456
build-talos:
452457
name: Build Talos
@@ -1168,12 +1173,13 @@ jobs:
11681173
# implies maintainer authorship). authorized-users is kept as a second
11691174
# defense layer controlling who may actually SSH in.
11701175
#
1171-
# A node-join red the lane decided not to block on reaches here as a
1172-
# SUCCESSFUL job, so `failure()` alone would skip the step on the one
1173-
# failure whose sandbox is worth attaching to. The E2E step records that
1174-
# decision and this reads it back. Being label-gated is what makes that
1175-
# affordable: the session opens for a PR someone deliberately marked for
1176-
# debugging, not on every softened run.
1176+
# `failure()` is the whole condition now. It used to be joined by a
1177+
# soft-red output, because a node-join red the lane decided not to block
1178+
# on arrived here as a SUCCESSFUL job and would have been skipped. That
1179+
# carve-out is gone with the QEMU substrate: the node-join deadline
1180+
# fails its suite like any other deadline, so a sandbox worth attaching
1181+
# to always belongs to a failed job. Label-gating is what keeps this
1182+
# affordable, and it is unchanged.
11771183
#
11781184
# Uses cozystack/breakpoint-action (fork of namespacelabs/breakpoint-action)
11791185
# pinned by SHA. The fork adds: pause-idle mode (initial grace period for
@@ -1229,10 +1235,19 @@ jobs:
12291235
- name: Tear down sandbox
12301236
if: always()
12311237
run: |
1238+
# Loud, but never the job's verdict. A failed teardown means a dirty
1239+
# host, and this runner is discarded after the job, so there is no next
1240+
# run to protect -- while failing the job here posts the required
1241+
# "E2E Tests" status as a failure that no reader can tell apart from a
1242+
# real one. The annotation is what a reused host (a developer machine)
1243+
# needs; `delete-cluster-container` returning non-zero is not evidence
1244+
# about the product.
12321245
cleanup_rc=0
12331246
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete-cluster-container || cleanup_rc=$?
12341247
make -C packages/core/testing SANDBOX_NAME=$SANDBOX_NAME delete || true
1235-
exit "$cleanup_rc"
1248+
if [ "$cleanup_rc" -ne 0 ]; then
1249+
echo "::error title=sandbox teardown::teardown exited $cleanup_rc; the host may hold a stale compose project or zpool"
1250+
fi
12361251
12371252
# Report the required "E2E Tests" gate as a commit status rather than relying
12381253
# on a job named "E2E Tests". A required *job* that is skipped counts

‎hack/e2e-platform-packages.sh‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ linstor_drbd_enabled=${COZY_LINSTOR_DRBD_ENABLED:-true}
1111
# to 4Gi and the request from 60M to 256Mi, for the reason stated above that
1212
# override below.
1313
#
14-
# The consequence is worth stating where it is made: the merge-gating lane
15-
# therefore does not exercise the shipped CDI default. Whether a tenant worker
16-
# disk imports at 600M is answered by the QEMU lanes (nightly.yaml, e2e-tag.yaml),
17-
# which take no override, and not here.
14+
# The consequence is worth stating where it is made, and it applies to both:
15+
# the merge-gating lane exercises neither the shipped CDI default nor
16+
# `drbd.enabled: true`. Whether a tenant worker disk imports at 600M, and
17+
# whether the DRBD path works at all, are answered by the QEMU lanes
18+
# (nightly.yaml, e2e-tag.yaml), which take no override, and not here.
1819
case "$linstor_drbd_enabled" in
1920
true|false) ;;
2021
*)

0 commit comments

Comments
 (0)