From 6da1fe4d675f46b1559c758579975f5479c01397 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Fri, 13 Nov 2026 14:22:14 +0100 Subject: [PATCH] test: make Sentry acceptance cleanup resilient (#411) --- skills/sentry-telemetry-privacy/SKILL.md | 2 +- skills/sentry-telemetry-privacy/acceptance.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/skills/sentry-telemetry-privacy/SKILL.md b/skills/sentry-telemetry-privacy/SKILL.md index 61d6f0c..33a3782 100644 --- a/skills/sentry-telemetry-privacy/SKILL.md +++ b/skills/sentry-telemetry-privacy/SKILL.md @@ -20,6 +20,6 @@ When changing this behavior: ## Acceptance -Run `skills/sentry-telemetry-privacy/acceptance.sh`. The recipe runs the focused .NET test from the current checkout in a uniquely named disposable Compose project using the upstream .NET SDK image. It publishes no ports, creates no application image, uses no deployed configuration, and removes and verifies the project's containers, volumes, and network. Upstream SDK images remain cached. Record the project name, test result, `local images built: none`, and resource-cleanup verification in the linked Gitea issue/PR. +Run `skills/sentry-telemetry-privacy/acceptance.sh`. The recipe runs the focused .NET test from the current checkout in a uniquely named disposable Compose project using the upstream .NET SDK image. It publishes no ports, creates no application image, uses no deployed configuration, and removes and verifies the project's containers, volumes, and network. Its `EXIT` trap disables inherited `errexit`/`nounset` while attempting each independent cleanup step, preserves the original test status, and reports cleanup failures. Upstream SDK images remain cached. Record the project name, test result, `local images built: none`, and resource-cleanup verification in the linked Gitea issue/PR. This proves local sanitization logic and event/transaction payload handling only. It does not claim a live Sentry/GlitchTip delivery or rotate any external credential. diff --git a/skills/sentry-telemetry-privacy/acceptance.sh b/skills/sentry-telemetry-privacy/acceptance.sh index 0d841ab..9d98a7a 100755 --- a/skills/sentry-telemetry-privacy/acceptance.sh +++ b/skills/sentry-telemetry-privacy/acceptance.sh @@ -13,6 +13,10 @@ local_image_tags=() cleanup() { status=$? trap - EXIT + # Cleanup must continue through every independent resource even when the + # caller enabled errexit/nounset or an earlier Docker query failed. + set +e + set +u cleanup_failed=0 docker compose --project-directory "$repo_root" --env-file "$env_file" \ -f "$compose_file" -p "$project" down --volumes --remove-orphans || cleanup_failed=1