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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1zu7inoki4 is past its budget: trevato/forge: "whether a snapshot is encrypted before it leaves is a setting, and the status says which > by default t… #12687

Merged opened this

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

Merged

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

  • Merged. scout/12634-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 736d7ef.

Review

Sign in to review this change.
4 files changed +30 −3
test/helpers/stub-bucket.ts +18
@@ -43,3 +43,21 @@ export function stubBucket(objects: Map<string, Uint8Array>, seen: string[]): Re
4343 },
4444 });
4545 }
46
47 const PROXY_NAMES = ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "http_proxy", "https_proxy", "all_proxy", "NO_PROXY", "no_proxy"] as const;

Next step: make stubBucket users get this by default, so a fourth test file cannot forget the call and flake in a check cell.

48
49 /**
50 * A stub bucket is on loopback: a proxy in the environment (a check cell's egress proxy, or one
51 * another test left behind) must not stand between the client and it. Drops the proxy variables
52 * and returns what puts them back.
53 */
54 export function bypassProxy(): () => void {
55 const saved = PROXY_NAMES.map((n) => [n, process.env[n]] as const);
56 for (const n of PROXY_NAMES) delete process.env[n];
57 return () => {
58 for (const [n, v] of saved) {
59 if (v === undefined) delete process.env[n];
60 else process.env[n] = v;
61 }
62 };
63 }
test/mirror-worker.test.ts +4 −1
@@ -13,7 +13,10 @@ import { lastMirror, mirrorOffThread } from "../src/snapshot/mirror.ts";
1313 import { storeFrom } from "../src/snapshot/remake.ts";
1414 import { sealedStore } from "../src/snapshot/sealed_store.ts";
1515 import { dirStore, remakeOf, s3Store, type Store } from "../src/snapshot/store.ts";
16 import { stubBucket } from "./helpers/stub-bucket.ts";
16 import { bypassProxy, stubBucket } from "./helpers/stub-bucket.ts";
17
18 const restoreProxy = bypassProxy();
19 afterAll(restoreProxy);
1720
1821 const root = mkdtempSync(join(tmpdir(), "mirror-worker-"));
1922 afterAll(() => rmSync(root, { recursive: true, force: true }));
test/snapshot-incremental.test.ts +4 −1
@@ -74,7 +74,10 @@ import { dirStore, s3Store, type Store } from "../src/snapshot/store.ts";
7474 import { verifySnapshot } from "../src/snapshot/verify.ts";
7575 import { chunked, pack } from "./helpers/snapshot-fixtures.ts";
7676 import { quietLogs } from "./helpers/globals.ts";
77 import { stubBucket } from "./helpers/stub-bucket.ts";
77 import { bypassProxy, stubBucket } from "./helpers/stub-bucket.ts";
78
79 const restoreProxy = bypassProxy();
80 afterAll(restoreProxy);
7881
7982 quietLogs();
8083
test/snapshot-repositories.test.ts +4 −1
@@ -69,7 +69,10 @@ import {
6969 } from "../src/snapshot/store.ts";
7070 import { verifySnapshot } from "../src/snapshot/verify.ts";
7171 import { quietLogs } from "./helpers/globals.ts";
72 import { stubBucket } from "./helpers/stub-bucket.ts";
72 import { bypassProxy, stubBucket } from "./helpers/stub-bucket.ts";
73
74 const restoreProxy = bypassProxy();
75 afterAll(restoreProxy);
7376
7477 quietLogs();
7578

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs