Skip to content

ci: add pnpm support to plugin-e2e workflow#144

Open
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
hugh/update-plugin-e2e-pnpm-support
Open

ci: add pnpm support to plugin-e2e workflow#144
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
hugh/update-plugin-e2e-pnpm-support

Conversation

@privilegedescalation-engineer
Copy link
Copy Markdown
Contributor

Summary

Updates reusable workflow to support both npm and pnpm package managers.

Changes

  • Detect package manager — checks for and field
  • Corepack support — uses Corepack when field is present (respects version pinning)
  • pnpm store caching — caches pnpm store for faster dependency installation
  • Dynamic install step — uses  ENOENT  ENOENT: no such file or directory, open '/paperclip/patches/embedded-postgres@18.1.0-beta.16.patch'

pnpm: ENOENT: no such file or directory, open '/paperclip/patches/embedded-postgres@18.1.0-beta.16.patch'
at async open (node:internal/fs/promises:640:25)
at async Object.readFile (node:internal/fs/promises:1287:14)
at async createBase32HashFromFile (/paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:8816:23)
at async /paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:138813:17
at async /paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:138790:24
at async Promise.all (index 0)
at async pMapValue (/paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:138789:7)
at async _install (/paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:184714:134)
at async mutateModules (/paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:184673:23)
at async install (/paperclip/.cache/node/corepack/v1/pnpm/9.15.4/dist/pnpm.cjs:184599:45) or
up to date, audited 1 package in 373ms

found 0 vulnerabilities based on detected manager

  • Dynamic test step — runs  ERR_PNPM_NO_SCRIPT  Missing script: e2e

Command "e2e" not found. or based on detected manager

  • e2e-namespace input — allows caller workflows to specify the target namespace (default: headlamp-dev)

Why

Several plugins (argocd, rook, kube-vip, sealed-secrets) use pnpm with field. The original workflow only supported npm. This update makes the workflow work for all plugin repos regardless of package manager choice.

Required reviewers

  1. UAT (Pixel Patty) — E2E workflow validation
  2. QA (Regression Regina) — test coverage and security
  3. CTO (Null Pointer Nancy) — architecture and security

cc @cpfarhood

Co-Authored-By: Paperclip noreply@paperclip.ing

- Detect package manager (pnpm vs npm) from pnpm-lock.yaml
- Use Corepack when packageManager field is present
- Add pnpm store caching
- Update all steps to use correct package manager
- Add e2e-namespace input for namespace flexibility

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@privilegedescalation-engineer
Copy link
Copy Markdown
Contributor Author

UAT Review: APPROVED

Review type: Code-review UAT (CTO directive — no browser UI component)

What changed: plugin-e2e.yaml detects pnpm (via Corepack or pnpm/action-setup), caches pnpm store and npm cache, and uses correct package manager throughout. Added e2e-namespace input.

UAT verification:

  • Package manager detection: checks pnpm-lock.yaml and packageManager field ✅
  • pnpm setup: Corebook path when packageManager field present, direct setup otherwise ✅
  • Cache: pnpm store cached with hash key ✅
  • Install/build/test: uses correct PM for each step ✅
  • Critical path: unblocks downstream plugin E2E PRs. ✅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant