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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1uelmre57z is past its budget: trevato/forge: "migrate: after > mirror: the crew's work branches never go to the source" failed on 4 pulls in the last… #4532

Merged opened this

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

Merged

scout/forge:scout/4528-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 2 commits fork 2 threads · 2 unresolved

  • Merged. scout/4528-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 479d484.

Review

Sign in to review this change.
1 file changed +9 −7
test/migrate-after.test.ts +9 −7
@@ -31,7 +31,9 @@ import { promote } from "./helpers/members.ts";
3131
3232 quietLogs();
3333 // Git and a fake forge under a loaded check machine outlast bun's 5 s default.
34 setDefaultTimeout(30_000);
34 // The test's own limit sits above the longest wait inside it (`settledTarget`'s
35 // deadline), so a slow push is waited for, never cut off as a timeout.
36 setDefaultTimeout(120_000);

Nit: the limit (120 s) and the deadline at settledTarget (90 s) are separate literals; one shared constant would keep the invariant stated in the comment true by construction.

3537
3638 describe("migrate: after", () => {
3739 let dataDir: string;
@@ -113,7 +115,7 @@ describe("migrate: after", () => {
113115 if (!connected.ok) throw new Error(connected.error);
114116 originId = connected.value.id;
115117 stopMirror = startMirrorOut(app);
116 }, 30_000);
118 }, 120_000);
117119
118120 afterAll(async () => {
119121 // Pushes still running read the database and the repositories: let them
@@ -131,7 +133,7 @@ describe("migrate: after", () => {
131133 // directory goes once they let go. A scratch directory that will not go
132134 // is the machine's to sweep, not a verdict on the code under test.
133135 await rm(dataDir, { recursive: true, force: true, maxRetries: 40, retryDelay: 100 }).catch(() => {});
134 }, 30_000);
136 }, 120_000);
135137
136138 test("the form's word: anything but archive or mirror leaves it alone", () => {
137139 expect(afterChoice("archive")).toBe("archive");
@@ -184,7 +186,7 @@ describe("migrate: after", () => {
184186 const settledTarget = async (copy: string, ok: (t: NonNullable<ReturnType<typeof getMirrorTarget>>) => boolean) => {
185187 // A deadline, not a count of naps: a loaded check machine slows the push,
186188 // never the verdict.
187 const deadline = Date.now() + 40_000;
189 const deadline = Date.now() + 90_000;
188190 while (Date.now() < deadline) {
189191 const held = getMirrorTarget(app.db, getRepo(app.db, "alice", copy)!.id);
190192 if (held !== undefined && ok(held)) return held;
@@ -269,13 +271,13 @@ describe("migrate: after, refused at the boundary", () => {
269271 dataDir = await mkdtemp(join(tmpdir(), "forge-migrate-after-400-"));
270272 app = createApp({ dataDir, port: 0 });
271273 servers = await serve(app);
272 }, 60_000);
274 }, 120_000);
273275
274276 afterAll(async () => {
275277 servers.stop();
276278 app.close();
277279 await rm(dataDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 100 });
278 }, 30_000);
280 }, 120_000);
279281
280282 test("POST /api/v1/migrate with an unknown `after` is a 400 naming the three words", async () => {
281283 const made = await createUser(app.db, {
@@ -297,5 +299,5 @@ describe("migrate: after, refused at the boundary", () => {
297299 expect(said).toContain("leave");
298300 expect(said).toContain("archive");
299301 expect(said).toContain("mirror");
300 }, 60_000);
302 }, 120_000);
301303 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs