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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2tcvuk57nu was degraded 45 minutes today: trevato/forge: "the merge queue > a gate that never answers is abandoned at the deadline, and the next sweep lands (#34… #5357

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/5334-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork

  • Merged. scout/5334-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 02fc349.

Review

Sign in to review this change.
1 file changed +7 −3
test/merge-queue.test.ts +7 −3
@@ -50,6 +50,8 @@ describe("the merge queue", () => {
5050 let flaky = 0;
5151 /** The signal the last gate was handed: the queue aborts it at the deadline. */
5252 let lastSignal: AbortSignal | undefined;
53 /** Called as a gate starts, before the deadline can fire on a loaded machine. */
54 let atGate: (() => void) | undefined;
5355
5456 const git = (repo: Repo, ...args: string[]) =>
5557 Bun.spawnSync(["git", ...args], {
@@ -74,6 +76,7 @@ describe("the merge queue", () => {
7476 provideChecksForTest(app, {
7577 gate: async (repo: Repo, _pull: Pull, commitOid: string, signal?: AbortSignal) => {
7678 lastSignal = signal;
79 atGate?.();
7780 if (held !== undefined) await held;
7881 if (cutOff > 0) {
7982 cutOff--;
@@ -461,18 +464,19 @@ describe("the merge queue", () => {
461464 const warn = console.warn;
462465 console.warn = (line: string) => warned.push(line);
463466 held = new Promise<void>(() => {});
467 let words = "";
464468 try {
465469 lastSignal = undefined;
470 atGate = () => (words = queueWords(repo.id));
466471 const sweep = sweepGreen(app, repo);
467 // Building the candidate is git work first: wait for the gate itself.
468 for (let i = 0; i < 6000 && lastSignal === undefined; i++) await Bun.sleep(5);
469 expect(queueWords(repo.id)).toMatch(/^gating 1 pull since \d\d:\d\d$/);
470472 expect(await sweep).toBe(0);
471473 } finally {
472474 held = undefined;
475 atGate = undefined;
473476 console.warn = warn;
474477 restore();
475478 }
479 expect(words).toMatch(/^gating 1 pull since \d\d:\d\d$/);
476480 expect((lastSignal as AbortSignal | undefined)?.aborted).toBe(true);
477481 expect(warned.some((l) => l.includes("[queue] candidate abandoned") && l.includes(`#${pull.number}`))).toBe(true);
478482 expect(queueWords(repo.id)).toBe("idle");

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs