Skip to content

fix(e2e): add pnpm support and e2e-namespace/plugin-name inputs#171

Open
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
hugh/add-pnpm-install-and-e2e-namespace-to-plugin-e2e
Open

fix(e2e): add pnpm support and e2e-namespace/plugin-name inputs#171
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
hugh/add-pnpm-install-and-e2e-namespace-to-plugin-e2e

Conversation

@privilegedescalation-engineer
Copy link
Copy Markdown
Contributor

Summary

Adds pnpm support and two new inputs (e2e-namespace, plugin-name) to plugin-e2e.yaml. This fixes the startup_failure on headlamp-tns-csi-plugin where npm ci was called on a pnpm-based project.

Problem

The plugin-e2e.yaml reusable workflow hardcoded npm ci as the install step. When tns-csi (and other pnpm-based plugins) invoke the workflow:

  1. npm ci fails because pnpm-lock.yaml is not a npm lockfile
  2. Even if install somehow passes, npm run e2e uses the wrong package manager
  3. The workflow lacks e2e-namespace input, so all plugins must hardcode headlamp-dev in their caller workflow

Fix

  • Added Detect package manager step — detects pnpm-lock.yaml presence
  • Added Setup pnpm step using pnpm/action-setup@v5 with store caching
  • Added e2e-namespace input (default: headlamp-dev)
  • Added plugin-name input (default: empty string) for ConfigMap/mount path flexibility
  • Conditional install: pnpm install --frozen-lockfile vs npm ci
  • Conditional build: pnpm run build vs npx @kinvolk/headlamp-plugin build
  • Conditional test: pnpm run e2e vs npm run e2e
  • Added E2E_PLUGIN_NAME env var to Deploy step

Testing

Related Issues

  • PRI-647 (QA review blocked by UAT — this fix unblocks PRI-654)
  • PRI-639 (E2E infrastructure parent issue)
  • PRI-654 (UAT review — structural bug was pnpm not installed before use)

cc @cpfarhood

…ugin-e2e

Backported from PRs #168, #169, #166 (all passing CI).

Adds:
- pnpm detection with pnpm/action-setup and pnpm store caching
- e2e-namespace input (default: headlamp-dev)
- plugin-name input (default: empty string)
- Conditional install/build/test steps: pnpm --frozen-lockfile | npm ci
- E2E_PLUGIN_NAME env var passed to deploy-e2e-headlamp.sh

Fixes startup_failure on tns-csi plugin (and all pnpm-based plugins)
caused by 'npm ci' being called where 'pnpm install --frozen-lockfile' required.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
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