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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3tgtaj5heo was degraded 21 minutes today: trevato/forge: "origins on the web > Mirror starts a job, shows its stages, and lands on the mirror" failed on 3 pulls … #6995

Merged opened this

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

Merged

scout/forge:scout/6986-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/6986-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 1a49291.

Review

Sign in to review this change.
1 file changed +15 −1
test/web-origins.test.ts +15 −1
@@ -24,6 +24,7 @@ import { listPins } from "../src/core/pins.ts";
2424 import { getRepo } from "../src/core/repos.ts";
2525 import { getUserByName } from "../src/core/users.ts";
2626 import { forgetProviders } from "../src/origins/providers/index.ts";
27 import { firstFetchRetry } from "../src/origins/mirror.ts";
2728 import { advance, createJob, settled } from "../src/origins/jobs.ts";
2829 import { icon } from "../src/web/ui.ts";
2930 import { quietLogs, withoutEnv } from "./helpers/globals.ts";
@@ -420,6 +421,19 @@ describe("origins on the web", () => {
420421 });
421422
422423 test("Mirror starts a job, shows its stages, and lands on the mirror", async () => {
424 // The first fetch is retried on the forge's clock (2 s, 5 s, 10 s); a
425 // loaded check machine can spend all three and fail the job. Retry on a
426 // short clock instead, so the verdict is the mirror's, not the load's.
427 const found = firstFetchRetry.ms;

Nit: 40 x 250 ms is a 10 s ceiling that the test never reaches when the fetch works. A short comment tying it to the settled wait would show the two budgets are meant to match. fastFirstFetch in test/helpers/globals.ts already does the save and restore, so you may not need this wrapper.

428 firstFetchRetry.ms = Array.from({ length: 40 }, () => 250);
429 try {
430 await mirrorStartsAJob();
431 } finally {
432 firstFetchRetry.ms = found;
433 }
434 });
435
436 async function mirrorStartsAJob(): Promise<void> {
423437 const id = listOrigins(app.db, getUserByName(app.db, "alice")!.id)[0]!.id;
424438 const mirrored = await asUser(alice, `/settings/origins/${id}/mirror`, {
425439 form: { fullName: "octo/widgets" },
@@ -449,7 +463,7 @@ describe("origins on the web", () => {
449463 const after = await (await asUser(alice, jobPath)).text();
450464 expect(after).not.toContain("http-equiv");
451465 expect(after).toContain("Open the mirror");
452 });
466 }
453467
454468 test("a running job's stream sends the next stage, then done with the mirror's address; only its starter may read it", async () => {
455469 const id = listOrigins(app.db, getUserByName(app.db, "alice")!.id)[0]!.id;

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs