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
ci: Fix a couple of memory leaks in test setups #16655
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SevInf
requested review from
danstarns and
aqrln
and removed request for
a team and
danstarns
December 6, 2022 17:23
Jolg42
reviewed
Dec 6, 2022
Jolg42
reviewed
Dec 6, 2022
Looks good to me, let's make it obvious with code comments why these new lines are important 👍🏼 |
millsp
approved these changes
Dec 6, 2022
aqrln
approved these changes
Dec 6, 2022
This fixes 2 memory leaks in our test setup: 1. Jest passes every file through transform and caches the results on disk and in memory. That included every generated client as well, so they were kept in memory from the time they were first loaded until process finishes, even though they are needed only for 1 test suite. Fixed by using `transformIgnorePatterns` options in jest config. 2. `debug` library keeps a list of last 100 logs that would be used for panic error messages later. If error object gets into this list, it will keep whole jest sandbox alive until process finishes. Fixed by clearing logs on `$disconnect` Fix #16594
SevInf
force-pushed
the
fix/memory-ci-again
branch
from
December 7, 2022 08:58
8db2db0
to
27bf813
Compare
Jolg42
approved these changes
Dec 7, 2022
jkomyno
pushed a commit
that referenced
this pull request
Dec 21, 2022
This fixes 2 memory leaks in our test setup: 1. Jest passes every file through transform and caches the results on disk and in memory. That included every generated client as well, so they were kept in memory from the time they were first loaded until process finishes, even though they are needed only for 1 test suite. Fixed by using `transformIgnorePatterns` options in jest config. 2. `debug` library keeps a list of last 100 logs that would be used for panic error messages later. If error object gets into this list, it will keep whole jest sandbox alive until process finishes. Fixed by clearing logs on `$disconnect` Fix #16594
jkomyno
pushed a commit
that referenced
this pull request
Dec 21, 2022
This fixes 2 memory leaks in our test setup: 1. Jest passes every file through transform and caches the results on disk and in memory. That included every generated client as well, so they were kept in memory from the time they were first loaded until process finishes, even though they are needed only for 1 test suite. Fixed by using `transformIgnorePatterns` options in jest config. 2. `debug` library keeps a list of last 100 logs that would be used for panic error messages later. If error object gets into this list, it will keep whole jest sandbox alive until process finishes. Fixed by clearing logs on `$disconnect` Fix #16594
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes 2 memory leaks in our test setup:
Jest passes every file through transform and caches the results
on disk and in memory. That included every generated client as well, so
they were kept in memory from the time they were first loaded until
process finishes, even though they are needed only for 1 test suite.
Fixed by using
transformIgnorePatterns
options in jest config.debug
library keeps a list of last 100 logs that would be used forpanic error messages later. If error object gets into this list, it will
keep whole jest sandbox alive until process finishes. Fixed by clearing
logs on
$disconnect
Fix #16594