From 4d80d396f1080e3ff7f304d40051f0f2b7a7c8ff Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 12 Mar 2026 20:31:03 +0100 Subject: [PATCH] fix(ci): capture test failure details before pod cleanup The test-gate pod gets cleaned up immediately on failure, losing all stdout. Pipe cargo test through tee and grep for FAILED/panicked output before exiting, so failure logs are preserved in Argo. Co-Authored-By: Claude Opus 4.6 --- infra/k8s/argo/ci-pipeline-template.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/infra/k8s/argo/ci-pipeline-template.yaml b/infra/k8s/argo/ci-pipeline-template.yaml index 41007685b..175264bd6 100644 --- a/infra/k8s/argo/ci-pipeline-template.yaml +++ b/infra/k8s/argo/ci-pipeline-template.yaml @@ -314,7 +314,13 @@ spec: cargo clippy --workspace --lib -- -D warnings echo "=== Running tests (lib only, no integration) ===" - cargo test --workspace --lib + cargo test --workspace --lib 2>&1 | tee /tmp/test-output.log + TEST_EXIT=${PIPESTATUS[0]} + if [ "$TEST_EXIT" -ne 0 ]; then + echo "=== TEST FAILURES ===" + grep -A5 'FAILED\|panicked\|test result: FAILED' /tmp/test-output.log || true + exit "$TEST_EXIT" + fi echo "=== Test gate passed ==="