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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3tgtaj5heo is past its budget: trevato/forge: "origins on the web > Mirror starts a job, shows its stages, and lands on the mirror" failed on 5 pulls … #10558

Merged opened this

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

Merged

mason/forge:mason/10507-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 3 commits fork

  • Merged. mason/10507-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 1cc0508.

Review

Sign in to review this change.
2 files changed +12 −4
test/packs-up.test.ts +5 −2
@@ -15,7 +15,7 @@ import { addSubscription } from "../src/core/subscriptions.ts";
1515 import { checkUpstream } from "../src/actions/upstream_follow.ts";
1616 import { getRepoById } from "../src/core/repos.ts";
1717 import { getUserByName } from "../src/core/users.ts";
18 import { provideMirrorOutboundForTest } from "../src/origins/git-mirror.ts";
18 import { mirrorOutboundForTest, provideMirrorOutboundForTest } from "../src/origins/git-mirror.ts";
1919 import { finishWords, OWNER, prepareOwner } from "../src/packs/up.ts";
2020 import { deployCommands } from "../src/packs/words.ts";
2121 import { repoDir } from "../src/git/repos.ts";
@@ -203,6 +203,9 @@ describe("the one command, against a fake source", () => {
203203 const dir = repoDir(app.reposRoot, OWNER, a.name);
204204 // The staged copy is what the check's fetch would have brought.
205205 git(dir, "fetch", "-q", "--no-tags", src, `+${tip}:refs/upstream-follow/${branch}`);
206 // Put back what was found, not `{}`: the preload's loopback allowance is
207 // what the next file in this shard mirrors from (#10507).
208 const found = mirrorOutboundForTest();
206209 provideMirrorOutboundForTest({ allow: ["127.0.0.1"] });
207210 try {
208211 const f = getFollow(app.db, repo.id)!;
@@ -214,7 +217,7 @@ describe("the one command, against a fake source", () => {
214217 expect(getFollow(app.db, repo.id)!.behind).toBe(1);
215218 expect(getFollow(app.db, repo.id)!.tip).toBe(tip);
216219 } finally {
217 provideMirrorOutboundForTest({});
220 provideMirrorOutboundForTest(found);
218221 server.stop(true);
219222 }
220223 });
test/web-origins.test.ts +7 −2
@@ -28,7 +28,7 @@ import { forgetProviders } from "../src/origins/providers/index.ts";
2828 import { firstFetchRetry } from "../src/origins/mirror.ts";
2929 import { advance, createJob, settled } from "../src/origins/jobs.ts";
3030 import { icon } from "../src/web/ui.ts";
31 import { quietLogs, withoutEnv } from "./helpers/globals.ts";
31 import { mirrorOutbound, quietLogs, withoutEnv } from "./helpers/globals.ts";
3232 import {
3333 newFakeOAuth,
3434 newFakeState,
@@ -41,6 +41,11 @@ import { spriteAsset } from "../src/web/asset.ts";
4141 import { adminCookie, seedAdmin } from "./helpers/admin.ts";
4242
4343 quietLogs();
44 // Every mirror here fetches from a loopback origin. Say so in this file rather
45 // than lean on the preload: a file before this one in the same shard that left
46 // the vet tightened refused every fetch, and the job failed after its retries
47 // (#10507).
48 mirrorOutbound({ allow: ["127.0.0.1", "::1"] });
4449
4550 // Every test here drives a real git fetch and renders real pages; on a loaded
4651 // check machine the 5 s default measures the machine, not the code.
@@ -483,7 +488,7 @@ describe("origins on the web", () => {
483488
484489 const jobId = jobPath.split("/").pop()!;
485490 const done = await settled(jobId);
486 expect(done?.stage).toBe("done");
491 expect({ stage: done?.stage, error: done?.error }).toEqual({ stage: "done", error: undefined });
487492 expect(getRepo(app.db, "alice", "widgets")).toBeDefined();
488493
489494 // Finished: no self-refresh loop, a redirect to the mirror instead.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs