fix(ci): reset crabbox pnpm hydrate state

This commit is contained in:
Vincent Koc
2026-06-03 05:33:59 +02:00
parent 8f1ae5967e
commit 78b3f60dbd
3 changed files with 21 additions and 0 deletions

View File

@@ -120,6 +120,21 @@ jobs:
append_pnpm_option_arg PNPM_CONFIG_MODULES_DIR modules-dir
append_pnpm_option_arg PNPM_CONFIG_NETWORK_CONCURRENCY network-concurrency
append_pnpm_option_arg PNPM_CONFIG_VIRTUAL_STORE_DIR virtual-store-dir
reset_crabbox_pnpm_path() {
local path="$1"
if [ -z "$path" ]; then
return
fi
case "$path" in
/var/tmp/openclaw-pnpm-*) rm -rf "$path" ;;
esac
}
reset_crabbox_pnpm_path "${PNPM_CONFIG_MODULES_DIR:-}"
reset_crabbox_pnpm_path "${PNPM_CONFIG_STORE_DIR:-}"
reset_crabbox_pnpm_path "${PNPM_CONFIG_VIRTUAL_STORE_DIR:-}"
if [ -L node_modules ] && [ "$(readlink node_modules)" = "${PNPM_CONFIG_MODULES_DIR:-}" ]; then
rm -f node_modules
fi
if [ -n "${PNPM_CONFIG_MODULES_DIR:-}" ]; then
mkdir -p "$PNPM_CONFIG_MODULES_DIR"
ln -sfn . "$PNPM_CONFIG_MODULES_DIR/node_modules"

View File

@@ -47,6 +47,7 @@ Docs: https://docs.openclaw.ai
- Agents/providers: avoid loading owner plugin runtimes for explicitly configured custom provider models during OpenAI-compatible transport setup.
- Release/CI/E2E: fail early when Crabbox sparse-sync full checkouts do not have enough local disk, with guidance for moving the sync root.
- Release/CI/E2E: reset shared Crabbox pnpm hydrate state before installs so stale `/var/tmp` stores cannot leave `pnpm install` spinning after completion.
- Build: render independent CLI startup metadata help snapshots concurrently to cut cold build-all metadata time.
- Plugins: stop timed-out package-boundary prep steps by process group so descendant TypeScript/helper processes do not survive local check cleanup.
- Control UI: serve static assets asynchronously after safe-open checks so large UI files do not block Gateway request handling.

View File

@@ -141,6 +141,11 @@ describe("package acceptance workflow", () => {
expect(hydratePnpm.if).toBeUndefined();
expect(hydratePnpm.run).toContain('corepack enable --install-directory "$PNPM_HOME"');
expect(hydratePnpm.run).toContain("COREPACK_HOME");
expect(hydratePnpm.run).toContain("reset_crabbox_pnpm_path");
expect(hydratePnpm.run).toContain("/var/tmp/openclaw-pnpm-*) rm -rf");
expect(hydratePnpm.run).toContain(
'[ "$(readlink node_modules)" = "${PNPM_CONFIG_MODULES_DIR:-}" ]',
);
expect(workflowStep(hydrate, "Fetch main ref").run).toContain(
"timeout --signal=TERM --kill-after=10s 30s git",
);