Public: anyone can read this; the crew can change it.

Two tests red only beside others: the clog sentence skips repositories not on this forge, and the shard test runs outside a worker #17584

opened this

Merged 17h 47m ago, live in production

sold/recurring-reds → main 0 commits 1 thread · 1 unresolved

  • Merged. sold/recurring-reds was merged into main as d26b453.

Review

Sign in to review this change.
3 files changed +18 −2
src/flow/clog_view.ts +2 −1
@@ -73,7 +73,8 @@ export function readClogView(db: Database, now = new Date()): ClogView {
7373
7474 const approved = new Set(approvedRows(db).map(key));
7575 const conflicted = conflictedPulls(db).filter((c) => approved.has(key(c))).length;
76 const hot = warmFiles().sort((a, b) => b.pulls - a.pulls || a.path.localeCompare(b.path))[0];
76 // The pull files are kept for the process, so a repository this database does not have is left out, as above.
77 const hot = warmFiles().filter((f) => nameOf(f.repoId) !== "").sort((a, b) => b.pulls - a.pulls || a.path.localeCompare(b.path))[0];

Correct. Next: this line is long. Split the chain, and run bun scripts/gate.ts --fix if the gate objects.

7778 const standing = readClog(db, now).standing;
7879 // Checks stopped for CPU come first when they are the lane's main failure (#11617).
7980 const cpu = cpuStopReason(cpuStops(db, now));
test/flow-clog-page.test.ts +13
@@ -103,6 +103,19 @@ test("pulls touching the same files are listed as a pair, linked to both, and th
103103 expect(html).toContain("3 open pulls touch src/a.ts");
104104 });
105105
106 test("a repository that is not on this forge never takes the hottest file's place", async () => {
107 // What another app in this process learned: its repository is not in this database.
108 rememberPullFiles("not-on-this-forge", [901, 902, 903, 904, 905, 906].map((number) => ({ number, files: ["src/elsewhere.ts"] })));
109 try {
110 const html = await page();
111 expect(html).toContain("3 open pulls touch src/a.ts");
112 expect(html).not.toContain("src/elsewhere.ts");
113 expect(flowLines(app.db).join("\n").replace(/\s*\n/g, " ")).toContain("3 open pulls touch src/a.ts");
114 } finally {
115 rememberPullFiles("not-on-this-forge", []);
116 }
117 });
118
106119 test("the bottleneck sentence appears when approved pulls conflict", async () => {
107120 const p = pull();
108121 const issue = app.db.query<{ id: string }, [number]>("SELECT id FROM issue WHERE number = ?1").get(p)!;
test/shards-parallel.test.ts +3 −1
@@ -17,9 +17,11 @@ const script = new URL("../scripts/test-shards.ts", import.meta.url).pathname;
1717 let dir = "";
1818
1919 const runner = async (args: string[], env: Record<string, string> = {}): Promise<{ code: number; out: string }> => {
20 // This file may itself run in a `--parallel` worker; the check starts the runner outside one.
21 const { BUN_TEST_WORKER_ID: _bun, JEST_WORKER_ID: _jest, ...outside } = process.env;
2022 const child = Bun.spawn(["bun", script, ...args], {
2123 cwd: dir,
22 env: { ...process.env, FORGE_CHECK_SHARDS: "2", FORGE_CHECK_SCRATCH: join(dir, "scratch"), ...env },
24 env: { ...outside, FORGE_CHECK_SHARDS: "2", FORGE_CHECK_SCRATCH: join(dir, "scratch"), ...env },
2325 stdin: "ignore",
2426 stdout: "pipe",
2527 stderr: "pipe",

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs