fix(ci): stopped mtime prune from gutting extracted bazel repos

- The hosted disk-cache prune swept ~/.cache/omp-bazel-repo file-by-file;
  extracted repository contents keep upstream-archive mtimes (months old),
  so a restored archive lost most of rules_rust while bazel still trusted
  the entry's recorded_inputs — both darwin release legs failed with
  'BUILD file not found' in release run 30519253683. Prune only the
  action disk cache, whose files carry bazel-written mtimes.
- Gave the logger burst-order contract an explicit 30 s budget: two probe
  children measure ~4.4 s unloaded and bun's 5 s default test timeout
  SIGTERMed them (exit 143) on shared-core runners.
This commit is contained in:
can1357
2026-07-30 08:33:27 +02:00
parent c3d1586740
commit 053dbfa605
2 changed files with 31 additions and 19 deletions
+8 -4
View File
@@ -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"
+23 -15
View File
@@ -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");