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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:253591l30d is past its budget: trevato/forge: "RepoSource: one repository, two places to read it from > a mirror reports its stages in order and ends … #7713

Merged opened this

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

Merged

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

  • Merged. scout/7685-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 7dde582.

Review

Sign in to review this change.
1 file changed +10 −4
test/view-source.test.ts +10 −4
@@ -55,6 +55,12 @@ const text = (body: Uint8Array): string => new TextDecoder().decode(body);
5555 // A fetch that fails should say so now, not after the forge's patience.
5656 fastFirstFetch();
5757
58 // A test that runs a whole mirror spawns real git against a second forge and
59 // then imports: ~0.2 s idle, past 2 s on a machine three times oversubscribed.
60 // Bun's 5 s default would make the verdict a measure of the check machine's
61 // load; what these tests judge is the order and the outcome, not the speed.
62 const MIRROR_MS = 60_000;

Fine as a stopgap. Consider a smaller number (e.g. 20 s) so a hung mirror fails in a useful time, and tie it to #1242 when that lands.

63
5864 describe("RepoSource: one repository, two places to read it from", () => {
5965 let dataDir: string;
6066 let originDataDir: string;
@@ -578,7 +584,7 @@ describe("RepoSource: one repository, two places to read it from", () => {
578584 );
579585 // And they carried something to read: "2 labels", "1 issue", …
580586 expect(seen).toContain("issues");
581 });
587 }, MIRROR_MS);
582588
583589 test("mirroring busts what the browse cache believed", async () => {
584590 const source = live("octo/widgets");
@@ -619,7 +625,7 @@ describe("RepoSource: one repository, two places to read it from", () => {
619625 >("SELECT COUNT(*) AS n FROM repo WHERE origin_full_name = ?1")
620626 .get("octo/ghost")!.n,
621627 ).toBe(1);
622 });
628 }, MIRROR_MS);
623629
624630 test("a failed fetch lands in the job and in fetch_error, scrubbed", async () => {
625631 const job = await settled(
@@ -648,7 +654,7 @@ describe("RepoSource: one repository, two places to read it from", () => {
648654 .get("octo/ghost")!;
649655 expect(row.fetch_error).not.toBe("");
650656 expect(row.fetch_error).not.toContain(ORIGIN_TOKEN);
651 });
657 }, MIRROR_MS);
652658
653659 // ---- the equivalence that makes the interface worth having ----
654660
@@ -1004,7 +1010,7 @@ describe("RepoSource: one repository, two places to read it from", () => {
10041010 })
10051011 ).status,
10061012 ).toBe(404);
1007 });
1013 }, MIRROR_MS);
10081014
10091015 test("the process-wide cache is the one the sources use", async () => {
10101016 clearViewCache();

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs