Skip to content

Commit 2dd0e23

Browse files
authored
fix(release): allow slow package setup (#184)
1 parent 8a70cde commit 2dd0e23

2 files changed

Lines changed: 20 additions & 9 deletions

File tree

scripts/onboarding/run-funnel-smoke.mjs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { currentNativeTargetSuffix } from "../certification/package-smoke-lib.mj
2727
export const DEFAULT_FUNNEL_TIMEOUT_MS = 120_000;
2828
export const FUNNEL_DOCTOR_INSTALL_BUDGET_MS = 120_000;
2929
export const FUNNEL_FIRST_QUERY_BUDGET_MS = 300_000;
30+
export const FUNNEL_PACKAGE_SETUP_TIMEOUT_MS = 300_000;
3031
export const FUNNEL_INSTALL_TARGET = "cursor";
3132
export const FUNNEL_EXPLORE_QUERY = "where does authentication reach storage?";
3233
export const MAX_FUNNEL_FOLLOW_UPS = 12;
@@ -331,15 +332,22 @@ async function prepareSourceRuntime(context) {
331332
async function preparePackageRuntime(context) {
332333
const artifact = await requireArtifact(context, "package");
333334
const packageArtifacts = await resolvePackageArtifacts(context, artifact);
334-
await runCommandCheck(context, "package-install", "npm", [
335-
"install",
336-
"--prefix",
337-
context.isolation.paths.npmPrefix,
338-
"--no-save",
339-
"--audit=false",
340-
"--fund=false",
341-
...packageArtifacts.paths,
342-
]);
335+
await runCommandCheck(
336+
context,
337+
"package-install",
338+
"npm",
339+
[
340+
"install",
341+
"--prefix",
342+
context.isolation.paths.npmPrefix,
343+
"--no-save",
344+
"--audit=false",
345+
"--fund=false",
346+
"--loglevel=verbose",
347+
...packageArtifacts.paths,
348+
],
349+
{ timeoutMs: FUNNEL_PACKAGE_SETUP_TIMEOUT_MS },
350+
);
343351
const packageRoot = path.join(context.isolation.paths.npmPrefix, "node_modules", "@lzehrung", "codegraph");
344352
const cliPath = path.join(packageRoot, "dist", "bin", "cli.js");
345353
const launcherDirectory = path.join(context.isolation.paths.npmPrefix, "node_modules", ".bin");

tests/onboarding-funnel.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
assertMcpSearchToolResult,
1010
FUNNEL_DOCTOR_INSTALL_BUDGET_MS,
1111
FUNNEL_EXPLORE_QUERY,
12+
FUNNEL_PACKAGE_SETUP_TIMEOUT_MS,
1213
runFunnelSmoke,
1314
} from "../scripts/onboarding/run-funnel-smoke.mjs";
1415
import { mkTmpDir } from "./helpers/filesystem.js";
@@ -506,8 +507,10 @@ describe("onboarding funnel smoke", () => {
506507
"--no-save",
507508
"--audit=false",
508509
"--fund=false",
510+
"--loglevel=verbose",
509511
...candidates.paths,
510512
]);
513+
expect(npmInstall?.options.timeoutMs).toBe(FUNNEL_PACKAGE_SETUP_TIMEOUT_MS);
511514
expect(result.checks).toContainEqual(expect.objectContaining({ name: "package-candidate", status: "pass" }));
512515
const packageLauncher = path.join(
513516
workspace,

0 commit comments

Comments
 (0)