fix(e2e): detect and use correct package manager (npm vs pnpm)#146
Open
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
Open
fix(e2e): detect and use correct package manager (npm vs pnpm)#146privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
Conversation
Previously the E2E workflow always used 'npm ci' regardless of which package manager the plugin repo actually uses. This caused E2E tests to fail on pnpm-managed repos because 'npm ci' cannot install from pnpm-lock.yaml. Add 'Detect package manager' step and conditional install/setup: - For npm repos: npm ci - For pnpm repos: corepack-based pnpm install (respecting packageManager field) Also add pnpm store caching for faster installs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix E2E workflow to detect and use the correct package manager (npm vs pnpm). Previously always used
npm ciwhich fails on pnpm-managed repos.Problem
E2E tests consistently failing across all Headlamp plugin repos because
plugin-e2e.yamlunconditionally runsnpm ci. Many plugins use pnpm (kube-vip, rook, argocd, tns-csi, etc.) which cannot be installed vianpm ci.Solution
Mirror the package manager detection logic already present in
plugin-ci.yaml:pnpm-lock.yaml)corepack enable pnpm+pnpm installnpm ciAdditional improvements
Install dependenciesinto npm/pnpm variantsRun E2E testsinto npm/pnpm variantsTesting
Once merged, update all plugin repos to change workflow ref from
hugh/add-pnpm-support-plugin-e2etomain.