From 053dbfa605491f7a2ff8679f5fa332c41619c097 Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 30 Jul 2026 08:33:27 +0200 Subject: [PATCH] =?UTF-8?q?fix(ci):=20stopped=20mtime=20prune=20from=20gut?= =?UTF-8?q?ting=20extracted=20bazel=20repos=20-=20The=20hosted=20disk-cach?= =?UTF-8?q?e=20prune=20swept=20~/.cache/omp-bazel-repo=20file-by-file;=20?= =?UTF-8?q?=20=20extracted=20repository=20contents=20keep=20upstream-archi?= =?UTF-8?q?ve=20mtimes=20(months=20old),=20=20=20so=20a=20restored=20archi?= =?UTF-8?q?ve=20lost=20most=20of=20rules=5Frust=20while=20bazel=20still=20?= =?UTF-8?q?trusted=20=20=20the=20entry's=20recorded=5Finputs=20=E2=80=94?= =?UTF-8?q?=20both=20darwin=20release=20legs=20failed=20with=20=20=20'BUIL?= =?UTF-8?q?D=20file=20not=20found'=20in=20release=20run=2030519253683.=20P?= =?UTF-8?q?rune=20only=20the=20=20=20action=20disk=20cache,=20whose=20file?= =?UTF-8?q?s=20carry=20bazel-written=20mtimes.=20-=20Gave=20the=20logger?= =?UTF-8?q?=20burst-order=20contract=20an=20explicit=2030=20s=20budget:=20?= =?UTF-8?q?two=20probe=20=20=20children=20measure=20~4.4=20s=20unloaded=20?= =?UTF-8?q?and=20bun's=205=20s=20default=20test=20timeout=20=20=20SIGTERMe?= =?UTF-8?q?d=20them=20(exit=20143)=20on=20shared-core=20runners.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/bazel-cache/action.yml | 12 ++++--- packages/utils/test/logger-contract.test.ts | 38 +++++++++++++-------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/actions/bazel-cache/action.yml b/.github/actions/bazel-cache/action.yml index 6247e2c9f..1fa3eff6f 100644 --- a/.github/actions/bazel-cache/action.yml +++ b/.github/actions/bazel-cache/action.yml @@ -137,10 +137,14 @@ runs: # generations wrote would otherwise ride along forever; drop # anything untouched for 14 days (tar preserves mtimes across # the actions/cache round trip, so age survives restores). - # Covers the repo download/contents cache too — bazel's own - # contents-cache GC only runs on idle servers, which short-lived - # CI invocations never have. - find "$HOME/.cache/omp-bazel-disk" "$HOME/.cache/omp-bazel-repo" -type f -mtime +14 -delete 2>/dev/null || true + # DISK CACHE ONLY: never prune omp-bazel-repo file-by-file — + # extracted repo contents keep upstream-archive mtimes (often + # months old), so an mtime sweep guts contents-cache entries + # while bazel still trusts their recorded_inputs, materializing + # hollow external repos ("BUILD file not found" — v17.2.0 + # release run 30519253683). The repo cache is bounded by the + # GitHub cache TTL/LRU at the archive level instead. + find "$HOME/.cache/omp-bazel-disk" -type f -mtime +14 -delete 2>/dev/null || true { echo "common --config=ci" echo "common --disk_cache=$HOME/.cache/omp-bazel-disk" diff --git a/packages/utils/test/logger-contract.test.ts b/packages/utils/test/logger-contract.test.ts index e714d1f5b..f6f0a7b93 100644 --- a/packages/utils/test/logger-contract.test.ts +++ b/packages/utils/test/logger-contract.test.ts @@ -248,22 +248,30 @@ describe("central logger transport lifecycle", () => { expect(payload).toEqual({ reconfigureThrew: true, sinkCount: 1, sinkSameContext: true }); }); - test("preserves burst order and drains on close and natural child exit", async () => { - for (const scenario of ["burst-close", "burst-natural"] as const) { - const result = await runScenario(scenario); - expect(result.stdout).toBe(""); - expect(result.stderr).toBe(""); - const text = (await readSingleLog(result.primaryDir)).text; - expect(text.endsWith(os.EOL)).toBe(true); - const lines = text.split(os.EOL); - expect(lines.pop()).toBe(""); - expect(lines).toHaveLength(1_000); - for (const [index, line] of lines.entries()) { - const entry = JSON.parse(line) as { message: string; index: number }; - expect(entry).toMatchObject({ message: scenario, index }); + // Two sequential probe children writing 1000 records each measure ~4.4 s + // on an unloaded runner — bun's 5 s default test timeout SIGTERMed the + // probe (exit 143) whenever CI runners shared cores. The contract is + // order + drain, not latency; give it an explicit budget. + test( + "preserves burst order and drains on close and natural child exit", + async () => { + for (const scenario of ["burst-close", "burst-natural"] as const) { + const result = await runScenario(scenario); + expect(result.stdout).toBe(""); + expect(result.stderr).toBe(""); + const text = (await readSingleLog(result.primaryDir)).text; + expect(text.endsWith(os.EOL)).toBe(true); + const lines = text.split(os.EOL); + expect(lines.pop()).toBe(""); + expect(lines).toHaveLength(1_000); + for (const [index, line] of lines.entries()) { + const entry = JSON.parse(line) as { message: string; index: number }; + expect(entry).toMatchObject({ message: scenario, index }); + } } - } - }); + }, + 30_000, + ); test("runs local console output before sinks and isolates throwing or disposed sinks", async () => { const result = await runScenario("sink-order");