-
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
JEST: Improve Jest Support #12339
Comments
@millsp mentioned that we might need to do a breaking change for the WASM module integration to continue supporting something like We'll need to decide if this is worth maintaining until P4 or it's okay to break earlier. |
Related upstream issue: jestjs/jest#11956 |
Commenting here as I think there's more issues related to this. The problemThis is my understanding of the problem, I'd love to be corrected if I've got it wrong!
Does the above sound correct? Related issuesThere are a lot of open issues related to this problem. As well as the issues listed above, I found the following:
Maybe also #12152 would help to lock down instances of this problem. WorkaroundsWhen it comes to Jest, the only workaround so far is to run less tests. It'd be amazing if something like #12153 could be implemented as part of this work. As the memory problem seems to be affecting a lot of people and doesn't have a clear fix or workaround yet. |
@m-allanson Thanks for summarizing the situation. Really appreciated. |
There's a workaround for this using As a demo I forked @aqrln's leak example to use sharding: m-allanson/prisma-leak-repro@6e5e273. If your tests are running on GitHub Actions, you can also use their matrix feature to run the shards in parallel. |
The new The main difference:
The v4 tests run faster with much less memory usage 🙌 Thanks Prisma folks who worked on this :) Prisma v4
Prisma v3
|
@m-allanson Good to hear! In Prisma 4 the main change here was done in #13811 From release notes https://github.com/prisma/prisma/releases/tag/4.0.0
|
@m-allanson We indeed have alleviated some of the symptoms, I'm very happy that this runs better for you. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I am closing this issue now as the original linked issues have been closed for a while now. There are still some memory problems, also and especially when using with Jest. We have issues tracking them: If you still have problems with Prisma and Jest, please see if an appropriate issues for that already exists under these labels - or create a new one an we'll figure it out. Thank you! |
Problem
The user describes it well in the issue:
Goal
Any steps we can do to improve the memory usage would be helpful for our community.
If we can't fully solve the issue, let's approach this incrementally: allow community to first run 500 tests serially, check-in with the community, then we'll consider 1000 and so on as we learn people are still having problems.
Next Steps
Issues
This issue collects issues related to Jest support with Prisma that might be related or closable after we resolve the problem described above.
Memory
nApi
enabled #8989Flakiness
ERROR Command failed with exit code 139. Segmentation fault (core dumped)
#8214Mocking
Internal Usage of Jest
The text was updated successfully, but these errors were encountered: