•  
      request #23413 Workaround Jest/ts-jest/TypeScript memory leaks
    Infos
    #23413
    Thomas Gerbet (tgerbet)
    2021-10-11 13:59
    2021-10-07 13:28
    24963
    Details
    Workaround Jest/ts-jest/TypeScript memory leaks

    Our recent upgrade to Jest 27 git #tuleap/stable/e48530ab87ecf7721e38e6e136791ffbebb5fb5e has put in evidence serious memory leaks. Those are known by upstream projects [0][1] but there is no solution at this time (and determining why and how it happens does not appear to be trivial to say the least).

    It leads to an excessive amount of memory consumption in our test pipeline. Multiple workarounds have been considered:

    • disabling the typechecking and forcing the garbage collection between each test suites
    • stop the workers after N tests to limit the impact of the leaks (no upstream support)
    • run multiple Jest instances to limit the impact of the leaks

    Only the last one allows us to not loose features or to have some advanced knowledge of Jest internals.

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-10-11
    Attachments
    Empty
    References

    Follow-ups