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
Merged 39h 59m ago, live in production
fix/guest-pull-forge-vars → main 0 commits
1 file
changed +7
−3
test/guest-pull.test.ts +7 −3
| @@ -6,6 +6,7 @@ | ||
| 6 | 6 | * a later push by the guest keeps it. |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | import { errorEnv } from "../src/actions/errors.ts"; | |
| 9 | 10 | import { afterAll, beforeAll, describe, expect, test } from "bun:test"; |
| 10 | 11 | import { mkdtemp, rm } from "node:fs/promises"; |
| 11 | 12 | import { tmpdir } from "node:os"; |
| @@ -115,9 +116,12 @@ describe("a pull from another forge is a guest until a writer approves it", () = | ||
| 115 | 116 | await rm(dataDir, { recursive: true, force: true }); |
| 116 | 117 | }); |
| 117 | 118 | |
| 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 | }; | |
| 121 | 125 | const held = (pull: Pull) => runtime.secretsFor(lib, appId, previewEnv(pull.number), "tok"); |
| 122 | 126 | |
| 123 | 127 | test("a waiting guest's preview starts with no variables and no forge token; after approval it has both", async () => { |
new above
offline