-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(client): throw error on caching platforms #18437
Conversation
CodSpeed Performance ReportMerging #18437 Summary
|
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
|
packages/client/src/runtime/core/init/checkPlatformCaching.test.ts
Outdated
Show resolved
Hide resolved
…r-platform-caching
….com:prisma/prisma into integration/fix/throw-error-platform-caching
Detects when Prisma Client is in an environment that is known to cause caching issues and throws an error for the user to fix.
Reminder of the problem:
On the first publication to eg. Vercel, the client will auto-generate and it will get cached. Then we change the schema, and on the second publication, the client will not auto-generate. Because @prisma/client is cached already, the auto-generate won't trigger again. We then have a caching problem, and queries or validation fail because of the de-sync.
Relevant research:
https://github.com/millsp/vercel-prisma-cache-issue-repro
https://www.notion.so/prismaio/Research-Vercel-Netlify-caching-behavior-4ca3e950d7bb43e081a1a2f5a5149518
https://prisma-company.slack.com/archives/C04D5C9D1FG/p1679440563960249
Issues:
Fixes https://github.com/prisma/prisma-private/issues/157
Fixes #6634
Fixes #7291
Fixes #7818
Closes https://github.com/prisma/client-planning/issues/296
Related PRs:
prisma/ecosystem-tests#3454