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: add option to disable worker_threads in jest-worker #7681

Merged
merged 2 commits into from
Jan 23, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 22, 2019

Summary

There are certain issues around worker_threads (notably missing process.umask, which makes a few dependencies throw). While these issues are getting fixed (npm/write-file-atomic#37 & nodejs/node#25526) I think we should be on the safe side with Jest 24 and wait for the dust to settle before using it in Jest.

However, the default behavior is still to use it if available, this PR explicitly disables it in the places we use jest-worker internally.

EDIT: Follow-up making it opt-in: #7693

Test plan

Unit test added. This should also fix CI for node 11.

Copy link
Contributor

@mattphillips mattphillips left a comment

Choose a reason for hiding this comment

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

Looks good to me assuming the tests pass ;)

@SimenB
Copy link
Member Author

SimenB commented Jan 23, 2019

image

@SimenB SimenB added this to the Jest 24 milestone Jan 23, 2019
@cpojer cpojer merged commit 967b335 into jestjs:master Jan 23, 2019
@cpojer
Copy link
Member

cpojer commented Jan 23, 2019

Let's get rid of this option once worker threads are known to be stable.

@SimenB SimenB deleted the disable-node-worker branch January 23, 2019 08:37
@SimenB
Copy link
Member Author

SimenB commented Jan 24, 2019

I think it's fair to remove it once Node promotes it from experimental status (it's still experimental even though it's unflagged).

However, as discussed, I'll swap this so it's opt-in rather than opt-out

captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
…7681)

* fix: add option to disable `worker_threads` in `jest-worker`

* link to PR
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants