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

guest-pull: the forge-made variables are errorEnv's own names, so the OTLP ones added in #17137 are not taken for seeded ones #17184

opened this

Merged 39h 59m ago, live in production

fix/guest-pull-forge-vars → main 0 commits

  • Merged. fix/guest-pull-forge-vars was merged into main as d6415a8.

Review

Sign in to review this change.
1 file changed +7 −3
test/guest-pull.test.ts +7 −3
@@ -6,6 +6,7 @@
66 * a later push by the guest keeps it.
77 */
88
9 import { errorEnv } from "../src/actions/errors.ts";
910 import { afterAll, beforeAll, describe, expect, test } from "bun:test";
1011 import { mkdtemp, rm } from "node:fs/promises";
1112 import { tmpdir } from "node:os";
@@ -115,9 +116,12 @@ describe("a pull from another forge is a guest until a writer approves it", () =
115116 await rm(dataDir, { recursive: true, force: true });
116117 });
117118
118 // Approved previews also carry the forge-made SENTRY_* variables (#6003); the seeded ones are
119 // what these tests pin.
120 const seeded = (vars: Record<string, string>) => Object.fromEntries(Object.entries(vars).filter(([k]) => !k.startsWith("SENTRY_")));
119 // Approved previews also carry the variables the forge makes for error intake (`errorEnv`:
120 // SENTRY_*, #6003, and OTEL_EXPORTER_OTLP_*, #17137); the seeded ones are what these tests pin.
121 const seeded = (vars: Record<string, string>) => {
122 const made = new Set(Object.keys(errorEnv(app, "http://forge.test", appId, "x")));
123 return Object.fromEntries(Object.entries(vars).filter(([k]) => !made.has(k)));
124 };
121125 const held = (pull: Pull) => runtime.secretsFor(lib, appId, previewEnv(pull.number), "tok");
122126
123127 test("a waiting guest's preview starts with no variables and no forge token; after approval it has both", async () => {

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs