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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:32cb1ovnai is past its budget: trevato/forge: "a big repository over smart http > --filter=blob:none over protocol v2 clones and checks out" failed on… #4735

Merged opened this

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

Merged

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

  • Merged. scout/4729-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as eab3323.

Review

Sign in to review this change.
1 file changed +18 −7
test/big-clone.test.ts +18 −7
@@ -179,6 +179,17 @@ function pausing(
179179 );
180180 }
181181
182 /**
183 * What a test that is not about stalls serves with: the verdict is the
184 * clone's, never the check machine's speed. A loaded machine that takes
185 * longer than a default window to start a pack is slow, not stalled.
186 */
187 const PATIENT: SmartHttpOptions = {

PATIENT is only half a fix if permits leak. Consider an afterEach that resets fetchOptions and link, so the four identical finally blocks go away and a new test cannot forget to restore them.

188 stall: { windowMs: 120_000, minBytes: 1 },
189 timeoutMs: 300_000,
190 idleMs: 120_000,
191 };
192
182193 describe("a big repository over smart http", () => {
183194 const stall: Stall = { windowMs: 1_000, minBytes: 16 * 1024 };
184195 const BIG = 4 * 1024 * 1024;
@@ -188,7 +199,7 @@ describe("a big repository over smart http", () => {
188199 let base: string;
189200 let big: Uint8Array;
190201 /** How this test's fetch is answered: its options and its link. */
191 let fetchOptions: SmartHttpOptions = {};
202 let fetchOptions: SmartHttpOptions = PATIENT;
192203 let link = (body: ReadableStream<Uint8Array>) => body;
193204
194205 beforeAll(async () => {
@@ -245,7 +256,7 @@ describe("a big repository over smart http", () => {
245256 expect(got.length).toBe(BIG);
246257 expect(Bun.hash(got)).toBe(Bun.hash(big));
247258 } finally {
248 fetchOptions = {};
259 fetchOptions = PATIENT;
249260 link = (body) => body;
250261 }
251262 }, 60_000);
@@ -257,7 +268,7 @@ describe("a big repository over smart http", () => {
257268 const run = await git(["clone", "-q", base, "clocked"], work);
258269 expect(run.code).not.toBe(0);
259270 } finally {
260 fetchOptions = {};
271 fetchOptions = PATIENT;
261272 link = (body) => body;
262273 }
263274 }, 60_000);
@@ -270,7 +281,7 @@ describe("a big repository over smart http", () => {
270281 expect(run.code).not.toBe(0);
271282 expect(run.err).toContain("early EOF");
272283 } finally {
273 fetchOptions = {};
284 fetchOptions = PATIENT;
274285 link = (body) => body;
275286 }
276287 }, 60_000);
@@ -282,7 +293,7 @@ describe("a big repository over smart http", () => {
282293 const run = await git(["clone", "-q", base, "paused"], work);
283294 expect(run.code).toBe(0);
284295 } finally {
285 fetchOptions = {};
296 fetchOptions = PATIENT;
286297 link = (body) => body;
287298 }
288299 }, 60_000);
@@ -307,7 +318,7 @@ describe("a big repository over smart http", () => {
307318 expect(await missing(clone)).toEqual([]);
308319 const got = new Uint8Array(await Bun.file(join(clone, "base.step")).arrayBuffer());
309320 expect(Bun.hash(got)).toBe(Bun.hash(big));
310 }, 60_000);
321 }, 180_000);
311322
312323 test(`--filter=blob:none over protocol v${version} clones and checks out`, async () => {
313324 const dir = `none-v${version}`;
@@ -319,7 +330,7 @@ describe("a big repository over smart http", () => {
319330 expect(run.code).toBe(0);
320331 expect(await Bun.file(join(work, dir, "README.md")).text()).toBe("# arm\n");
321332 expect((await Bun.file(join(work, dir, "base.step")).arrayBuffer()).byteLength).toBe(BIG);
322 }, 60_000);
333 }, 180_000);
323334 }
324335 });
325336

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs