Page MenuHomePhabricator

Upgrade WVUI node.js version
Closed, ResolvedPublic

Description

WVUI currently specifies a node.js version of 10.15.2 in its .nvmrc file, and that version is also used in CI for tests and builds.

This LTS version is either already at end-of-life or will be very shortly: https://nodejs.org/en/about/releases/

We should consider moving to a more recent LTS version of Node – v14 or v16 is what I'd suggest, to maximize the time until we have to switch again.

Remaining on Node v10 will block some of the work being explored in T272879 and will probably prevent us from using other tools in the future.

Would this upgrade require a security review?
No, not from past upgrades aligning downstream version with CI upgraded ones.

Acceptance criteria

  • Upgrade to Node v12 for now to unblock using Vite

Further upgrading will happen in successor library and be dependent on T267888

Event Timeline

@Jdforrester-WMF tells me this is blocked on upgrading the version of Node used in our CI images, which is in turn blocked on SRE approving a newer version of Node (at least for pipeline jobs like the one used for WVUI, which uses a production image)

Hmm, would Node.js v12 make any difference for our immediate needs, @egardner?

Hmm, would Node.js v12 make any difference for our immediate needs, @egardner?

Yes, it would. Vite requires Node.js v12 or higher.

Changed to depend on the Node 12 task instead of the Node 14 task. We may want to switch away from the pipeline to a "regular" CI job if that allows us to use Node 12 faster.

Unfortunately, because WVUI uses the pipeline, this isn't blocked by T286950 (which is done), it's blocked by T284346 (which is not, and is not in my gift).

You could switch to the non-pipeline legacy CI system, but that wouldn't give you an automatic build step.

You could switch to the non-pipeline legacy CI system, but that wouldn't give you an automatic build step.

Could you elaborate on (or link to documentation about) what the features are that the pipeline system gives us that the legacy system doesn't?

Change 713712 had a related patch set uploaded (by Jforrester; author: Jforrester):

[wvui@master] build: Switch base image to node12 / bullseyee now it's available

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

You could switch to the non-pipeline legacy CI system, but that wouldn't give you an automatic build step.

Could you elaborate on (or link to documentation about) what the features are that the pipeline system gives us that the legacy system doesn't?

Ha, sorry!

The legacy system doesn't let you pick which packages are available, or stay on node10 when the central control chooses to upgrade everyone to node12. The new GitLab CI system will look a lot more like the pipeline than the legacy system. The legacy system has whatever features I or Antoine or Kunal made for it, whereas in the pipeline you can do almost anything (as long as you're based on WMF prod images).

Change 713712 merged by jenkins-bot:

[wvui@master] build: Switch base image to node12 / bullseye now it's available

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

Change 715153 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update WVUI to v0.3.0

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

Change 715153 merged by jenkins-bot:

[mediawiki/core@master] Update WVUI to v0.3.0

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