mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
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 62f2234aea)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 file changed
+18
-4
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user