-
Notifications
You must be signed in to change notification settings - Fork 153
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
chore(deps-dev): update to node 16 #5343
Conversation
I'm looking into the test timing (only looking at unit tests in following experiments):
I didn't try the vm.compileScript / vm.Script patch (Not sure if we'd want a patch & unclear whether it'd help with execution time). Jest is unable to mainline this patch because of jestjs/jest#12205 (comment) I haven't tried the jest-light-runner yet. I think we may want to go with sharding for now (possibly removing |
|
Thanks @karanbirsingh for recording the different test cases! I've implemented a "sharding + remove max-old-space-size" approach (this involved adding a new separate job for publishing merged code coverage results). Even with these mitigations in place, it seems inconsistent about how quick it is. This most recent run shows a comparable time (sharded) to Node 14 (without sharding), but the checks against 5128d7e showed the unit tests taking ~8m per job. |
Details
This PR bumps our default/recommended build environment to Node 16.
There aren't any real breaking changes affecting us here, except that our unit tests appear to be much slower (timing out after 10m instead of taking 6-7m in Node 14). We could work around this by just sharding the unit tests like we do for e2e tests already, but it's not ideal; besides "still being slower for local development", it also breaks code coverage reporting (unless we add some new job to merge the results before publishing coverage).
The most relevant looking Jest/Node/V8 issues seem to be covered in the discussion of jestjs/jest#11956 - it would be good to experiment with some of the options on that thread to see if we can get the unit test time back down without needing to shard them. Some options to explore:
Alternatively, we could explore more generic ways of making the tests faster; I think https://github.com/nicolo-ribaudo/jest-light-runner would be promising to look into.
Motivation
Keep dependencies up to date; 16 has been an LTS release for several months now.
Also,
accessibility-insights-service
updated to Node 16 yesterday, and we want to ensure that the packages we publish for it to consume are tested in the same environment.Context
n/a
Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.