Skip to content

test(e2e): run prisma init from the local tarball in the corepack test - #30183

Merged
aqrln merged 1 commit into
v7from
v7-e2e-init-corepack-local-cli
Sep 1, 2026
Merged

test(e2e): run prisma init from the local tarball in the corepack test#30183
aqrln merged 1 commit into
v7from
v7-e2e-init-corepack-local-cli

Conversation

@tensordreams

@tensordreams tensordreams commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

The prisma-init-corepack e2e test fails on every CI run (for example, this shard on #30180, and the same shard on the v7 tip's own CI run from 2026-08-27, before that PR existed).

Cause: the test runs pnpm dlx prisma init. dlx ignores the locally installed package and fetches prisma@latest from the registry — and latest is Prisma 8 (8.0.0-rc.12 today; Prisma 7 moved to the prev dist-tag). The v8 CLI rejects the fixture's Prisma 7 prisma.config.ts with CLI.CONFIG_MISSING_MARKER. The test was green on 2026-08-17 and red by 2026-08-27, matching the dist-tag transition, and can never be green again in this form.

Fix: run pnpm exec prisma init instead. The fixture already installs the prisma tarball under test as a devDependency, so exec makes the test hermetic and exercises the v7 CLI this branch builds. This matches the sibling prisma-init-bun test, which also runs the locally installed CLI.

The corepack regression coverage this test exists for (#28504) is unchanged: prisma init still executes in a corepack enabled container through a corepack-managed pnpm (packageManager: pnpm@10.15.1).

Testing performed

  • Read the failing job log: the error envelope comes from the v8 CLI (CLI.CONFIG_MISSING_MARKER, "most likely a Prisma 7 config"), immediately after dlx downloads prisma from the registry.
  • Verified registry state: prisma dist-tags are latest: 8.0.0-rc.12, prev: 7.10.0.
  • The e2e shard on this PR's CI is the verification that the test passes again.

Related PRs

Summary by CodeRabbit

  • Tests
    • Updated the Prisma initialization end-to-end test to run the locally installed Prisma package.
    • Improved test reliability by avoiding unexpected package retrieval during setup.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Team

Run ID: bfa53ab3-ef75-4e5f-91bf-c822aa6ed866

📥 Commits

Reviewing files that changed from the base of the PR and between 6ec4a6a and c0dba31.

📒 Files selected for processing (1)
  • packages/client/tests/e2e/prisma-init-corepack/_steps.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Prisma init Corepack E2E test now runs pnpm exec prisma init instead of pnpm dlx prisma init. This uses the installed Prisma package.

Changes

Prisma init E2E test

Layer / File(s) Summary
Execute the installed Prisma package
packages/client/tests/e2e/prisma-init-corepack/_steps.ts
The test invokes the installed Prisma package with pnpm exec prisma init instead of fetching it with pnpm dlx.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to c0dba

This localized test-only change makes the corepack test use the branch’s locally installed Prisma CLI, with no actionable merge-blocking risk remaining after normal checks and review.

Suggested reviewers: aqrln

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: the Corepack E2E test runs Prisma Init from the local tarball.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v7-e2e-init-corepack-local-cli

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/index-browser.js 2.29 KB (0%)
packages/client/runtime/index-browser.d.ts 3.37 KB (0%)
packages/cli/build/index.js 110 B (0%)
packages/client/prisma-client-0.0.0.tgz 25.59 MB (0%)
packages/cli/prisma-0.0.0.tgz 13.52 MB (0%)
packages/bundle-size/da-workers-libsql/output.tgz 1.28 MB (0%)
packages/bundle-size/da-workers-neon/output.tgz 1.35 MB (0%)
packages/bundle-size/da-workers-pg/output.tgz 1.34 MB (0%)
packages/bundle-size/da-workers-planetscale/output.tgz 1.28 MB (0%)
packages/bundle-size/da-workers-d1/output.tgz 1.26 MB (0%)

@tensordreams
tensordreams force-pushed the v7-e2e-init-corepack-local-cli branch from 00559b3 to 6ec4a6a Compare August 31, 2026 17:02
Comment thread packages/client/tests/e2e/prisma-init-corepack/_steps.ts Outdated
pnpm dlx prisma init fetches prisma@latest from the registry, which is
Prisma 8 since mid-August and rejects the fixture Prisma 7
prisma.config.ts (CLI.CONFIG_MISSING_MARKER), so the test fails on
every run. The fixture already installs the prisma tarball under test
as a devDependency; run it with pnpm exec instead. Corepack coverage
is unchanged: the CLI still runs through a corepack-managed pnpm.

Signed-off-by: Oleksii Orlenko <robot@aqrln.net>
@aqrln
aqrln merged commit 9cb9c08 into v7 Sep 1, 2026
241 of 242 checks passed
@aqrln
aqrln deleted the v7-e2e-init-corepack-local-cli branch September 1, 2026 09:18
aqrln pushed a commit that referenced this pull request Sep 1, 2026
…es (#30189)

## Summary

`pnpm audit --prod` (the "Run pnpm audit (production dependencies only)"
step of the Lint job) fails on every PR to this branch with four
advisories:

- `deepmerge-ts` < 8.0.0 — stack exhaustion on recursive object graphs
([GHSA-ggr8-5vv4-36mx](GHSA-ggr8-5vv4-36mx)),
high
- `mariadb` >= 3.4.0 < 3.4.6 — cleartext password leak to a MitM despite
`ssl: true`
([GHSA-cqhc-2h57-wpxf](GHSA-cqhc-2h57-wpxf),
high), cleartext transmission of sensitive information
([GHSA-42r5-vhpq-m858](GHSA-42r5-vhpq-m858),
moderate), and possible SQL injection in Buffer parameter escaping under
multibyte client charsets
([GHSA-g5xc-5w98-jfvm](GHSA-g5xc-5w98-jfvm),
moderate)

This PR bumps:

- `deepmerge-ts` 7.1.5 → 8.0.2 in `packages/config`. The v8 breaking
changes are Map deep-merging and a `deepmergeInto` mutation fix;
`@prisma/config` uses neither — it only calls the basic `deepmerge`
export on plain config objects (`loadConfigFromFile.ts`). v8 still ships
dual CJS/ESM.
- `mariadb` 3.4.5 → 3.5.3 in `packages/adapter-mariadb`. The advisories
say "patched >= 3.4.6", but npm has no 3.4.6 — the 3.4.x line ends at
3.4.5; 3.5.3 is the current release satisfying the range.

Lockfile updated with the repo-pinned pnpm 11.13.1.

## Testing performed

- `pnpm audit --prod` against the updated lockfile: "No known
vulnerabilities found".
- `pnpm --filter @prisma/config test`: 4 files, 142 passed, 2 skipped —
includes the config-merge tests that exercise `deepmerge`.
- `pnpm --filter @prisma/adapter-mariadb test`: 45 passed.

## Notes for the reviewer

- After this merges, the Lint job on this branch should go fully green
again (its other failure mode, prettier-check, is unaffected here).
- Related branch-health PRs: #30180 (rename guards),
#30183 (corepack e2e test).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated the MariaDB integration dependency to a newer version.
  * Updated the configuration merge dependency to a newer version.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Oleksii Orlenko <robot@aqrln.net>
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.

2 participants