Skip to content

build: Move the monorepo and Docker deploys to pnpm 12 (no-changelog) - #37899

Open
shortstacked wants to merge 6 commits into
devp-440-pnpm-deploy-speedfrom
devp-1062-evaluate-the-move-to-pnpm-12-for-the-monorepo-and-the-docker
Open

build: Move the monorepo and Docker deploys to pnpm 12 (no-changelog)#37899
shortstacked wants to merge 6 commits into
devp-440-pnpm-deploy-speedfrom
devp-1062-evaluate-the-move-to-pnpm-12-for-the-monorepo-and-the-docker

Conversation

@shortstacked

@shortstacked shortstacked commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Moves the monorepo, CI setup, production closure deploys, and runner image builds from pnpm 11.25.0 to pnpm 12.3.4. This PR is stacked on #37890.

pnpm 12 uses a Rust implementation and retains the pnpm 11 lockfile and content-store formats. The migration adds the package-manager environment document to both lockfiles and updates internal readers to select the project document.

The migration also addresses the compatibility differences found while running the existing build paths:

  • Adds an explicit lockfile directory to standalone .github/scripts installs.
  • Aligns @n8n/mcp-apps with the default TypeScript 6 catalog so the n8n deploy has one Vue peer binding.
  • Uses the copy import method for deploys. This avoids pnpm 12's unreferenced intermediate links tree on macOS.
  • Replaces pnpm add --prod with --save-prod.
  • Copies pnpm 12's native executable into the standard runners image.
  • Verifies that the runners image can execute the pinned pnpm version without network access.
  • Runs Docker smoke when the root package-manager pin changes.

The standard runners image grows from about 844 MB to 871 MB because pnpm 12 ships a 35.5 MB native executable. The n8n image remains about 1.87 GB. The distroless runners image remains about 798 MB.

How to test

  1. Run pnpm install --frozen-lockfile.
  2. Run pnpm install-workflow-scripts --frozen-lockfile.
  3. Run pnpm typecheck.
  4. Run pnpm build:n8n.
  5. Run pnpm --filter @n8n/engine build:docker.
  6. Build the n8n, runners, and runners-distroless bake targets.
  7. Run DOCKER_BUILD_DISTROLESS=true pnpm build:docker:smoke.
  8. Compare the CI install and Docker build durations with build: Deploy production closures without pnpm deploy --legacy (no-changelog) #37890.

Local verification completed:

  • Full typecheck passed: 139 tasks.
  • Code-health tests passed: 137 tests.
  • Playwright Janitor tests passed: 398 tests.
  • Workflow script tests passed: 702 tests.
  • MCP Apps tests passed: 103 tests.
  • pnpm build:n8n passed.
  • The engine deploy and image build passed.
  • The n8n and both runner images built.
  • The local image smoke passed, except for the Cloud chart check because Helm was not installed.
  • actionlint and git diff --check passed.

The full lint run completed 132 of 133 tasks. The unchanged packages/cli ESLint process did not produce diagnostics and exceeded the local timeout. All directly changed packages passed lint.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/DEVP-1062

Stacked on #37890.

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

🤖 PR Summary generated by AI

Review in cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Running ultrareview automatically — This cross-cutting migration moves the monorepo, CI workflows, and Docker builds to pnpm 12 across 45 files, including build tooling, lockfiles, and deployment infrastructure—a subtle bug could break all builds, releases, and image deploys.. I'll post findings when complete.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 5.66kB (-0.01%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 63.31MB -5.66kB (-0.01%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: editor-ui-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/src-*.js -297 bytes 3.37MB -0.01%
assets/src-*.js -704 bytes 804.77kB -0.09%
assets/SettingsOpenTelemetryView-*.js -3.14kB 57.61kB -5.17%
assets/SettingsUsageAndPlan-*.css -97 bytes 27.53kB -0.35%
assets/SettingsUsageAndPlan-*.js -997 bytes 23.64kB -4.05%
assets/otel.constants-*.js -419 bytes 1.33kB -23.9%

@n8n-assistant n8n-assistant Bot added the n8n team Authored by the n8n team label Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../testing/code-health/src/utils/pnpm-lock-parser.ts 42.85% 0 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

cubic-dev-ai[bot]

This comment was marked as outdated.

cubic-dev-ai[bot]

This comment was marked as outdated.

cubic-dev-ai[bot]

This comment was marked as outdated.

@shortstacked
shortstacked marked this pull request as ready for review September 5, 2026 07:28
@shortstacked
shortstacked requested a review from a team as a code owner September 5, 2026 07:28
@shortstacked
shortstacked requested review from CharlieKolb and removed request for a team September 5, 2026 07:28
cubic-dev-ai[bot]

This comment was marked as outdated.

Comment thread .github/workflows/testbox-evidence-spike.yml Fixed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would not auto-approve. Auto-approval blocked by 8 unresolved issues from previous reviews.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants