fix(e2e): add pnpm detection and support to plugin-e2e reusable workflow#153
fix(e2e): add pnpm detection and support to plugin-e2e reusable workflow#153privilegedescalation-engineer[bot] wants to merge 6 commits intomainfrom
Conversation
The reusable plugin-e2e.yaml previously hardcoded npm commands and headlamp-dev namespace. This aligns it with plugin-ci.yaml: - Auto-detect package manager (pnpm vs npm, same pattern as plugin-ci.yaml) - Use pnpm or npm commands based on detection - Add e2e-namespace input (default: headlamp-dev) - Setup pnpm via Corepack or pnpm/action-setup as appropriate - Cache pnpm store for faster runs Enables all plugin repos, regardless of package manager or target namespace, to use the reusable E2E workflow. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Automates creation of all E2E files for Headlamp plugins: - playwright.config.ts, e2e/auth.setup.ts, e2e/<plugin>.spec.ts - scripts/deploy/teardown-e2e-headlamp.sh - .github/workflows/e2e.yaml (reusable workflow) - Updates .gitignore and package.json Auto-detects npm vs pnpm. Used to scaffold 4 repos (rook, argocd, tns-csi, kube-vip) in PRI-619. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Runs pnpm install or npm install after modifying package.json so the lockfile stays in sync with the new @playwright/test dep. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Script checks latest CI and E2E run status across all plugin repos, replacing manual per-repo checks. Supports quick health gate verification during Ops heartbeats. Co-Authored-By: Paperclip <noreply@paperclip.ing>
…rkflow When package.json has a packageManager field (e.g., pnpm@10.32.1), use corepack prepare to install that exact version instead of pnpm/action-setup which ignores the packageManager field and causes version conflict errors. Fixes E2E test startup_failure in headlamp-kube-vip-plugin PR #50.
QA Review — PRI-891PR: #153Title: fix(e2e): add pnpm detection and support to plugin-e2e reusable workflow Review Order Check
Bug #1 — CRITICAL: kubectl version pinned to
|
UAT Review: HOLD — Needs E2E re-run after mergePR: #153 — fix(e2e): add pnpm detection and support UAT Assessment: Cannot fully validate — E2E not re-run after #149 mergeCI: Passing ✅ (PR Validation workflow, run 25438018871) Workflow-level review onlyThe code changes look correct:
Evidence requirement: E2E re-run neededBefore #149 (kubeconfig fix) merged: E2E on plugin repos using the reusable workflow failed with However, E2E has not been re-run on this branch after #149 merged. The last E2E run on this PR was before the kubeconfig fix was in main. Required action
UAT gate: E2E must pass before approval |
There was a problem hiding this comment.
QA Review: CHANGES REQUESTED — Critical Blocker (Review Retracted)
PR #153 — fix(e2e): add pnpm detection and support to plugin-e2e reusable workflow
CI Status
validate workflow: SUCCESS
Critical Blocker: Missing Get kubeconfig Step (Regresses #149 Fix)
Same blocker as PR #157. The plugin-e2e.yaml in this PR is missing the Get kubeconfig step that was added in PR #149 and is already merged into main.
Current state of this PR's plugin-e2e.yaml (lines 82-88):
- name: Setup kubectl
uses: azure/setup-kubectl@v4
with:
version: 'latest'
- name: Install dependencies
run: |
if [ "${{ steps.pkg-manager.outputs.manager }}" = "pnpm" ]; then
pnpm install --frozen-lockfile
else
npm ci
fiThe Get kubeconfig step (added in #149 at lines 40-75 on main) is completely absent. Merging this PR as-is will revert the fix from #149, causing E2E startup_failure again across all plugins using the reusable workflow.
What IS Correct in This PR
- Package manager detection using
pnpm-lock.yamlpresence: sound - Two-step pnpm setup (Corepack vs pnpm/action-setup): covers both cases correctly
- pnpm store caching: correct, reduces download time on subsequent runs
- pnpm store cache key:
${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}— correct - Commands:
pnpm install --frozen-lockfile,pnpm exec playwright,pnpm run e2e— all correct
Fix Required
Rebase this PR onto current main so it includes the Get kubeconfig step from #149. Once rebased, I will re-review.
Note
I previously approved this PR based on the diff alone. I am retracting that approval after discovering the head commit does not include #149's kubeconfig fix. This is a GitHub merge-base issue, not a code quality issue with the pnpm detection logic itself.
Summary
pkg-managerdetection step that checks for pnpm-lock.yamlpnpm install --frozen-lockfilefor pnpm projects,npm cifor npm projectspnpm execfor playwright and e2e test commands when using pnpmFixes PRI-853