The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Fail CI when a test step fails with no failing tests (#85184)
Riley Thompson6cb01426c5d6
diff --git a/.github/scripts/run-backend-test-jvms.sh b/.github/scripts/run-backend-test-jvms.shindex fe85f65ce7d..a89bd63a44b 100755--- a/.github/scripts/run-backend-test-jvms.sh+++ b/.github/scripts/run-backend-test-jvms.sh@@ -155,6 +155,11 @@ for idx in "${INDEXES[@]}"; doprepare_jvm_dir "$JVM_DIRS_ROOT/partition-$idx"done+# run_partition below can have a race where two `clojure` launchers both check if a file exists+# and try to copy it at the same time, and one fails and exits before the tests start. We avoid+# that by running this to ensure that the file exists.+clojure -Sdescribe >/dev/null || die "clojure -Sdescribe failed"+for idx in "${INDEXES[@]}"; dorun_partition "$idx" "$JVM_DIRS_ROOT/partition-$idx" &donediff --git a/release/ci-conductor/src/quarantine.test.ts b/release/ci-conductor/src/quarantine.test.tsindex dc0c0b4c4be..a9eb2203d02 100644--- a/release/ci-conductor/src/quarantine.test.ts+++ b/release/ci-conductor/src/quarantine.test.ts@@ -471,20 +471,20 @@ describe("checkQuarantineGate", () => {}}- it("passes without a verdict line when there are no failures to gate", async () => {+ it("fails when the test step failed with no failing tests", async () => {const { result, verdict } = await runCapturingLogs({suite: "e2e",failures: [],baseUrl: undefined,secret: undefined,- dryRun: true,+ dryRun: false,});expect(result).toEqual({- shouldFail: false,- enforced: false,- reason: "no failures to gate",+ shouldFail: true,+ enforced: true,+ reason: "the test step failed with no failing tests to check",});- expect(verdict).toBeUndefined();+ expect(verdict).toContain("VERDICT: FAIL");});it("reports COULD NOT CHECK — not FAIL — when the base URL is unset", async () => {diff --git a/release/ci-conductor/src/quarantine.ts b/release/ci-conductor/src/quarantine.tsindex 5d39df320dc..edcfcb41f31 100644--- a/release/ci-conductor/src/quarantine.ts+++ b/release/ci-conductor/src/quarantine.ts@@ -316,13 +316,12 @@ export async function checkQuarantineGate(opts: {log(RULE);if (failures.length === 0) {- log("✅ no failures this run — nothing to gate.");- log(RULE);- return {- shouldFail: false,- enforced: false,- reason: "no failures to gate",- };+ log("⚠️ the test step failed, but no failing tests were reported.");+ return finish({+ shouldFail: true,+ reason: "the test step failed with no failing tests to check",+ dryRun,+ });}if (!baseUrl) {