Page MenuHomePhabricator

[keyserver] Avoid concurrently calling source-nvm.sh in yarn dev
ClosedPublic

Authored by ashoat on Oct 26 2022, 7:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 9:43 AM
Unknown Object (File)
Fri, Nov 8, 7:00 AM
Unknown Object (File)
Tue, Nov 5, 2:07 AM
Unknown Object (File)
Oct 5 2024, 5:41 PM
Unknown Object (File)
Oct 5 2024, 5:41 PM
Unknown Object (File)
Oct 5 2024, 5:41 PM
Unknown Object (File)
Oct 5 2024, 5:38 PM
Unknown Object (File)
Oct 4 2024, 9:35 PM
Subscribers

Details

Summary

yarn dev currently calls source-nvm.sh twice at the same time. If the version of Node is not installed already, both calls will trigger an install.

The result is that one of the calls "clobbers" the other one's download, and the other call decides that the download failed and it needs to compile Node from source (which takes a long time).

This diff makes sure we call source-nvm.sh at the start (not concurrently), and wait for it to finish before we call the other commands.

Test Plan
  1. nvm uninstall 16.18 and run yarn dev again
  2. Replaced the nodemon call with a node --version call, which confirmed I needed to keep the source-nvm.sh in front of that part of the command

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

keyserver/package.json
16

For @atul's context: I had to keep the source-nvm.sh in front of nodemon, otherwise it didn't run the right version

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 26 2022, 7:34 AM
Harbormaster failed remote builds in B13047: Diff 17917!
atul added inline comments.
keyserver/package.json
16

Thanks for explaining

This revision is now accepted and ready to land.Oct 26 2022, 7:48 AM