Skip to content
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: remove global prisma (experiment) #333

Closed
wants to merge 3 commits into from
Closed

Conversation

stefl
Copy link
Contributor

@stefl stefl commented Nov 2, 2024

Description

  • An attempt to see if we can address the Prisma client connection issues we are having by adjusting how we're instantiating the Prisma client

Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oak-ai-lesson-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 6:08pm

@stefl stefl changed the title Fix/remove global prisma fix: remove global prisma (experiment) Nov 2, 2024
Copy link

sonarqubecloud bot commented Nov 2, 2024

Copy link

github-actions bot commented Nov 2, 2024

Playwright test results

passed  13 passed
skipped  1 skipped

Details

report  Open report ↗︎
stats  14 tests across 13 suites
duration  1 minute, 36 seconds
commit  f226c4a

Skipped tests

No persona › tests/auth.test.ts › authenticate through Clerk UI

Copy link
Collaborator

@codeincontext codeincontext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this will have a similar behaviour in production (which could fix the problem), but that it will create a new client on hot reloads in development. Is that right?

@@ -1,3 +1,4 @@
import { prisma } from "@oakai/db/client";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codeincontext if we don't want to change the global import behaviour, we need to add this anyway. This file isn't importing prisma at the moment because of the declare global in db/client.

I'm not sure how this isn't throwing an error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, very odd. Maybe we don't actually call these endpoints? I've approved #342

@stefl stefl closed this Nov 5, 2024
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