Skip to content

Migrate tests/browser to pnpm 11 devEngines.packageManager on rhoai-2.25 #2670

Description

@jiridanek

Background

On main, tests/browser was migrated to package.json5 with a devEngines.packageManager field, which makes pnpm 11 record the resolved pnpm version under packageManagerDependencies in pnpm-lock.yaml. scripts/get-pnpm-version.sh reads that field via yq.

On rhoai-2.25 (this branch), tests/browser was never migrated: it still ships a plain tests/browser/package.json with the old-style "packageManager": "[email protected]" field, and its lockfile has no packageManagerDependencies.

.github/actions/playwright-test/action.yml's "Determine pnpm version" step already existed on this branch (from an earlier backport) with a legacy grep-based fallback for exactly this old-style field. That fallback stopped being reachable once scripts/get-pnpm-version.sh was ported to this branch for jupyter/utils/addons CI (f54647ca3), because the step picked the script whenever it was present + yq was available, with no fallback on failure. This broke tests/browser's Playwright CI job with:

::error::Failed to extract valid pnpm version from tests/browser/pnpm-lock.yaml (got 'null')

Seen in PR #2641, run 30656665554.

Immediate fix (already merged)

.github/actions/playwright-test/action.yml now falls back to the legacy grep-based lookup whenever get-pnpm-version.sh can't resolve a version, instead of an either/or on script presence. This restores CI without touching tests/browser's tooling.

Follow-up (this issue)

Migrate tests/browser on rhoai-2.25 to match main:

  • Convert tests/browser/package.jsonpackage.json5
  • Add devEngines.packageManager (name: pnpm, a version range, onFail: download), drop the legacy packageManager field
  • Regenerate pnpm-lock.yaml with pnpm 11 so packageManagerDependencies is populated
  • Once done, the legacy fallback added in .github/actions/playwright-test/action.yml can be removed (or left as a harmless safety net for other future consumers)

Out of scope for the CVE-overrides PR that surfaced this, since it also implies dependency bumps (playwright, testcontainers, typescript, eslint) and lockfile regeneration that need their own review on a release branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions