Page MenuHomePhabricator

MediaWiki-Vagrant should use the same Node.js version as Wikimedia production
Open, Needs TriagePublic

Description

Wikimedia production uses Node.js 6.11.0. Vagrant uses 6.16.0 (currently; for some reason only the major version is pinned). It should match production, or (preferably) make it possible to select the node version per service.

Details

Related Gerrit Patches:
mediawiki/vagrant : masterWIP Update Node.js to v10

Related Objects

Event Timeline

Tgr created this task.Feb 26 2019, 4:12 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 26 2019, 4:12 AM

Given we've been migrating to 10, we should also bump to that.

zeljkofilipin added a subscriber: zeljkofilipin.

We should use the same version of node/npm across mw-vagrant, CI and production. See T210506#5065817.

Node 6 end of life is next month (2019-04-30).

hashar added a subscriber: hashar.EditedJul 25 2019, 6:16 PM

We are now using NodeJS 10. That can be aligned with Wikimedia production by using:

/etc/apt/sources.list.d/wikimedia-node10.list
deb http://apt.wikimedia.org/wikimedia stretch-wikimedia component/node10
#deb-src http://apt.wikimedia.org/wikimedia stretch-wikimedia component/node10

Change 545832 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/vagrant@master] WIP Update Node.js to v10

https://gerrit.wikimedia.org/r/545832

Change 545832 abandoned by Zfilipin:
WIP Update Node.js to v10

Reason:
no activity in a week

https://gerrit.wikimedia.org/r/545832

Tgr added a comment.Fri, Nov 22, 11:11 PM

Production uses a mix of node 6 and node 10 (the more important ones are still on 6), see T210704: Migrate node-based services in production to node10.
So vagrant needs the ability to use multiple node versions in parallel. Currently either the eventlogging or the restbase role is broken, depending on how one sets npm::node_version.

Tgr added a comment.Fri, Nov 22, 11:58 PM

So basically, we need to install something like nvm, install node manually (can't use apt / dpkg anymore; which also means we cannot automatically track production), extend npm::install and npm::update with a version parameter and make them call nvm use before-after the npm call, and do the same (of use nvm exec) for nodejs calls.

Alternatively, we could just wait until everything is kubernetized, at which point the issue will hopefully go away on its own.

Krinkle removed a subscriber: Krinkle.Sun, Nov 24, 2:53 AM