Install npm binary on Windows and Mac machines
Categories
(Infrastructure & Operations :: RelOps: General, task)
Tracking
(Not tracked)
People
(Reporter: valentin, Unassigned, NeedInfo)
References
Details
(Whiteboard: [relsre-infra] [relops-infra])
In bug 1917573 we added the possibility of using npm packages in xpcshell tests.
However, the npm binary doesn't exist on Windows and Mac.
If we want our npm supported tests to work on all platforms we'll need to add them to the windows and Mac images too.
https://phabricator.services.mozilla.com/D232053#inline-1293842
On linux, npm gets installed through the dockerfile. I'm not sure where we would have to get it installed for the windows tests. For Mac, it looks like the tests run on hardware so we would need to chat with the relops team about getting it added.
windows is managed by relops, it is easy to add something to an image, once starting work, it takes 2-5 business days.
Ryan and Jonathan, do you think you could assist with this task?
Thanks!
Comment 1•20 days ago
|
||
Greetings,
I checked a couple Macs and it looks like they have npm v6.11.3 installed. Is there a version that you are targeting?
Thank you
(In reply to Valentin Gosu [:valentin] (he/him) from comment #0)
In bug 1917573 we added the possibility of using npm packages in xpcshell tests.
However, the npm binary doesn't exist on Windows and Mac.
If we want our npm supported tests to work on all platforms we'll need to add them to the windows and Mac images too.https://phabricator.services.mozilla.com/D232053#inline-1293842
On linux, npm gets installed through the dockerfile. I'm not sure where we would have to get it installed for the windows tests. For Mac, it looks like the tests run on hardware so we would need to chat with the relops team about getting it added.
windows is managed by relops, it is easy to add something to an image, once starting work, it takes 2-5 business days.Ryan and Jonathan, do you think you could assist with this task?
Thanks!
Hi! Would you need this installed on a specific cloud worker pool, such as gecko-t/win11-64-2009
or hardware, such as releng-hardware/win11-64-2009-hw
?
Comment 3•20 days ago
|
||
I see there is a win64-node as a fetch in xpcshell. Likewise macosx64 exists. Is there something missing here?
Updated•17 days ago
|
Updated•17 days ago
|
Comment 4•17 days ago
|
||
:valentin, are the tasks Joel mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1943534#c3 usable?
Reporter | ||
Comment 5•16 days ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC -8) from comment #3)
I see there is a win64-node as a fetch in xpcshell. Likewise macosx64 exists. Is there something missing here?
For windows the output of running npm ci is:
[task 2025-01-24T19:42:15.265Z] 19:42:15 INFO - npm output:
[task 2025-01-24T19:42:15.275Z] 19:42:15 INFO - npm error: 'npm.exe' is not recognized as an internal or external command,
[task 2025-01-24T19:42:15.275Z] 19:42:15 INFO - operable program or batch file.
[task 2025-01-24T19:42:15.276Z] 19:42:15 INFO - npm return code: 1
I expect either npm isn't part of the path or isn't part of the win64-node package?
I get the same if I try npm
or npm.exe
.
For mac, it does seem to be installed, but doesn't seem to be behaving the same as the linux version.
[task 2025-01-24T14:13:06.897Z] 14:13:06 INFO - npm output:
[task 2025-01-24T14:13:06.897Z] 14:13:06 INFO - npm error: npm ERR! Cannot read property 'left-pad' of undefined
[task 2025-01-24T14:13:06.897Z] 14:13:06 INFO - npm ERR! A complete log of this run can be found in:
[task 2025-01-24T14:13:06.897Z] 14:13:06 INFO - npm ERR! /Users/cltbld/.npm/_logs/2025-01-24T14_13_06_865Z-debug.log
[task 2025-01-24T14:13:06.898Z] 14:13:06 INFO - npm return code: 1
[task 2025-01-24T14:13:06.931Z] 14:13:06 INFO - Using at most 48 threads.
Assuming that npm is installed on windows too, my latest attempt is to use from mozbuild.nodeutil import find_npm_executable
in runxpcshelltests.py, but for some reason I'm getting ModuleNotFoundError: No module named 'mozbuild'
on try even though it does work locally 🤔
Comment 6•12 days ago
|
||
are these tasks used successfully anywhere else?
I see we use this for http2 variant in mochitest, but this appears to only be enabled for linux. It also seems to be installed for source-test in general, but I only see linux using it. I also see perftest tasks using node, but no reference in the log files to indicate we use the binary.
on my local windows11 (24H2) machine, I downloaded the node.tar.zst and node.exe works for me locally.
looking at the osx log from comment 5 ^, I see reference of node output, this indicates that node is running:
[task 2025-01-24T14:16:44.383Z] 14:16:44 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 58753, 63763, 50747, 49474 and 53166. EchConfig is @AE3+DQBJBwAgACD8i9OZi0kiOdCpEkHKhGOd9MY7zTRl7veliUmqqjqdYQAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:16:44.383Z] 14:16:44 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:16:45.089Z] 14:16:45 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 59006, 51503, 49222, 62838 and 49298. EchConfig is @AE3+DQBJBwAgACClYhS9H3ywgtqqeiuvRZWLc9G7GlRyG+QCODpnnaCEWAAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:16:45.089Z] 14:16:45 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:18:40.648Z] 14:18:40 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 49329, 61746, 58008, 61182 and 54762. EchConfig is @AE3+DQBJBwAgACC4tZBeklLO4S+PEatfKAcdAF7h4kKYMIO20WeeLBAUPAAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:18:40.648Z] 14:18:40 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:20:56.964Z] 14:20:56 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 50348, 52977, 59387, 60748 and 52876. EchConfig is @AE3+DQBJBwAgACCcSu2gqHEnAvbnydjLhYFDONkK3Uq/nv7Qwect/vbOHQAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:20:56.964Z] 14:20:56 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:23:49.860Z] 14:23:49 INFO - node moz-http2 [stdout] errorError: This socket has been ended by the other party
[task 2025-01-24T14:23:54.272Z] 14:23:54 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 51546, 54882, 58801, 59109 and 51607. EchConfig is @AE3+DQBJBwAgACBtGYneFsfT9rxyM5b8Od8bFqSoB70rBJWhNCHG51CDUAAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:23:54.272Z] 14:23:54 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:23:54.736Z] 14:23:54 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 57332, 60763, 52232, 52629 and 65341. EchConfig is @AE3+DQBJBwAgACAmn6QyEzPenDDdNnVOYLYtJEe6RMqLmnbSck9bWRRcBAAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:23:54.736Z] 14:23:54 INFO - node moz-http2 [stdout]
same for the windows log:
[task 2025-01-24T14:10:58.405Z] 14:10:58 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 53288, 53289, 53290, 53291 and 53292. EchConfig is @AE3+DQBJBwAgACCS5HwBczNJDrWE7648MMvW5siyvtv6H73Hb/JjkZEZXQAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:10:58.406Z] 14:10:58 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:10:59.039Z] 14:10:59 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 57677, 57678, 57679, 57680 and 57681. EchConfig is @AE3+DQBJBwAgACA4v/PKY8QZv1zNhNUSlj6Y8+boZUJbJrhwy0fyoC2qVwAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:10:59.040Z] 14:10:59 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:12:30.545Z] 14:12:30 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 57690, 57691, 57692, 57693 and 57694. EchConfig is @AE3+DQBJBwAgACAO/OfJ8sI+uSvI7Fe4bWvetEXUNVxx50kl0a0Ld0zaWgAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:12:30.545Z] 14:12:30 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:14:04.807Z] 14:14:04 INFO - node moz-http2 [stdout] client errorError: read ECONNRESET
[task 2025-01-24T14:14:16.598Z] 14:14:16 INFO - node moz-http2 [stdout] client errorError: read ECONNRESET
[task 2025-01-24T14:14:20.294Z] 14:14:20 INFO - node moz-http2 [stdout] client errorError: read ECONNRESET
[task 2025-01-24T14:14:20.295Z] 14:14:20 INFO - node moz-http2 [stdout] client errorError: read ECONNRESET
[task 2025-01-24T14:14:21.357Z] 14:14:21 INFO - node moz-http2 [stdout] errorError: read ECONNRESET
[task 2025-01-24T14:14:21.771Z] 14:14:21 INFO - node moz-http2 [stdout] errorError: read ECONNRESET
[task 2025-01-24T14:14:22.892Z] 14:14:22 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 50031, 50032, 50033, 50034 and 50035. EchConfig is @AE3+DQBJBwAgACDotFrYxfqRwPv1EvEQTgd84Jt84cU/Rx1ZbFzLSNFMWwAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:14:22.893Z] 14:14:22 INFO - node moz-http2 [stdout]
[task 2025-01-24T14:14:23.468Z] 14:14:23 INFO - node moz-http2 [stdout] HTTP3 server listening on ports 50038, 50039, 50040, 50041 and 50042. EchConfig is @AE3+DQBJBwAgACAHEtBN8eeAO+BVwSHda5j/juBjRlYi2aosvtomx/40AgAQAAEAAQABAAMAAgABAAIAA0AOcHVibGljLmV4YW1wbGUAAA==@
[task 2025-01-24T14:14:23.469Z] 14:14:23 INFO - node moz-http2 [stdout]
are there other tools that are required for npm to work as expected?
Reporter | ||
Updated•12 days ago
|
Description
•