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

Revert "feat(testing): update jest to v29.6.1 (#18061)" #18096

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

barbados-clemens
Copy link
Contributor

@barbados-clemens barbados-clemens commented Jul 12, 2023

This reverts commit 90172c5.

Current Behavior

jest v29.6.1 appears to be having a memory leak of some kinds causing CI to crash with OOM when testing angular

Expected Behavior

nx own tests should not start failing in CI with jest version bumps

Related Issue(s)

maybe related:
jestjs/jest#14042

some extra notes while investigating:

  1. seems like tests that contain more imports that require transformations use more memory (obviously), but that memory is never freed. it just keeps growing. I would expect it to start going down after the transformed code is consumed and saved to cache?
  2. --detectLeaks (beta feature of jest) shows ever test has a leak, so maybe something there in our code setup might be doing something weird?
  3. did not see anything with --detectOpenHandles for the angular tests
  4. switching to another transformer (swc/jest) required refactoring all tests with mocks to make sure the import order is loading correctly (about 150 tests) but even when those tests weren't running heap usage was around 2 GB, when CI was dying around 1.8 GB (locally with ts-jest showing 2.8-3 GB of memory usage) and those last 150 tests might still reach the same usage?
  5. usage of jest v29.4.3 is around 800MB with a spike around 2GB (then drops back down pretty quick)

@barbados-clemens barbados-clemens requested a review from a team as a code owner July 12, 2023 21:17
@vercel
Copy link

vercel bot commented Jul 12, 2023

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

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 9:21pm

@barbados-clemens barbados-clemens self-assigned this Jul 12, 2023
@nx-cloud
Copy link

nx-cloud bot commented Jul 12, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 5cc7bd2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@barbados-clemens barbados-clemens added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Jul 12, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants