From 78b3f60dbd96f65dfde38fe88e290be01b5687db Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 3 Jun 2026 05:33:59 +0200 Subject: [PATCH] fix(ci): reset crabbox pnpm hydrate state --- .github/workflows/crabbox-hydrate.yml | 15 +++++++++++++++ CHANGELOG.md | 1 + test/scripts/package-acceptance-workflow.test.ts | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/crabbox-hydrate.yml b/.github/workflows/crabbox-hydrate.yml index e90ffe3637ee..3ed3fe8533f0 100644 --- a/.github/workflows/crabbox-hydrate.yml +++ b/.github/workflows/crabbox-hydrate.yml @@ -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" diff --git a/CHANGELOG.md b/CHANGELOG.md index 422d00cc2a56..c3e0c22c6f3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index a184b0ebe676..e18673a446a7 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -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", );