Page MenuHomePhabricator

Provide node14 and node16 images for running production node-based services
Closed, ResolvedPublic

Description

The more general T267891: Create Debian packages for Node.js 14 upgrade was declined (and then worked around for CI), but as @Esanders says in T267890#7884480, node12 is EOL which means a bunch of our tools are losing availability. Can this be discussed more directly?

Event Timeline

From https://nodejs.org/en/about/releases/:

ReleaseStatusInitial ReleaseActive LTS StartMaintenance LTS StartEnd-of-life
v12Maintenance LTS2019-04-232019-10-212020-11-302022-04-30
v14Maintenance LTS2020-04-212020-10-272021-10-192023-04-30
v16Active LTS2021-04-202021-10-262022-10-182024-04-30
v18Current2022-04-192022-10-252023-10-182025-04-30

@Joe's arguments from T267891: Create Debian packages for Node.js 14 upgrade that Debian will be providing critical security patches to nodejs v12 as long as their LTS OS versions are still using it are true. That reasoning misses that the nodejs community is much more proactive than say the PHP community in dropping support for EOL versions. Our nodejs codebases are also more dependent on 3rd party libraries than our PHP codebases are. Within days of an LTS reaching EOL major nodejs libraries will be looking to remove support for it from their releases.

Getting to v14 (EOL 2023-04-30) is necessary. I believe we should really be on v16 already (EOL 2024-04-30) and working out how we will migrate to v18 (LTS 2022-10-25) in Q2 of next fiscal (October-December 2022).

I would propose https://github.com/nodesource/distributions as the upstream for us to use to get deb packages from in the production blessed images. I do not have a strong opinion either way on if these should be mirrored on apt.wikimedia.org as separate components or if we can just pull directly from deb.nodesource.com.

While Debian has e.g. 14 and 16 in various development branches none of those are going to be continously updated (e.g. 14 will be replaced by 16 in testing soon).

We can import the nodesource packages into separate repository components, e.g. thirdparty/node14 and thirdparty/node16. This way applications have the flexibility to follow the LTS series that works best for their stack. I can have a look at setting up the repo syncs in the next days.

We can import the nodesource packages into separate repository components, e.g. thirdparty/node14 and thirdparty/node16. This way applications have the flexibility to follow the LTS series that works best for their stack. I can have a look at setting up the repo syncs in the next days.

That'd be great if that's a supportable way forward for SRE.

Within days of an LTS reaching EOL major nodejs libraries will be looking to remove support for it from their releases.

Indeed, and many don't even wait for the EOL date. I've seen several dependencies drop Node 12 support in the last few months citing the "upcoming EOL".

We can import the nodesource packages into separate repository components, e.g. thirdparty/node14 and thirdparty/node16. This way applications have the flexibility to follow the LTS series that works best for their stack. I can have a look at setting up the repo syncs in the next days.

That'd be great if that's a supportable way forward for SRE.

Using the external nodesource debs has various downsides (we have no control over the maintenance, they link various components statically that properly patched to use the system libs in Debian and a few more), but we also don't have the resources available to maintain quality packages of multiple LTS branches in parallel (and we need to work on higher priority tasks), so it's a tradeoff/compromise to be made.

One important precondition is the lifetime, though. In the past many of our applications missed to migrate to a new Node LTS in time, but it wasn't as much of an issue since we simply backported fixes to an otherwise EOLed LTS branch. That will no longer be possible when using the external nodesource packages, so any production service using these base images needs to commit to follow supported LTS series (so that we can cull EOLed images from the registry).

I can take care of the repo syncs next week and then we can figure out next steps.

Change 789592 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] Enable repo sync for node14

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

Change 789592 merged by Muehlenhoff:

[operations/puppet@production] Enable repo sync for node14

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

I've added repo sync definitions for node 14 on Bullseye (and imported 14.19.2 into it). I suppose 16 is needed as well?

I've added repo sync definitions for node 14 on Bullseye (and imported 14.19.2 into it).

Thank you!

I suppose 16 is needed as well?

Yes, please.

Change 789776 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] Enable repo sync for Node 16

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

Change 789776 merged by Muehlenhoff:

[operations/puppet@production] Enable repo sync for Node 16

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

I suppose 16 is needed as well?

Yes, please.

Ok, thirdparty/node16 now also contains Node 16.15

bd808 renamed this task from Provide node14 images for running production node-based services to Provide node14 and node16 images for running production node-based services.May 6 2022, 5:24 PM

Change 790264 had a related patch set uploaded (by Giuseppe Lavagetto; author: Giuseppe Lavagetto):

[operations/docker-images/production-images@master] Add node14, node16 images

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

Change 790264 merged by Giuseppe Lavagetto:

[operations/docker-images/production-images@master] Add node14, node16 images

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

I've build and published the nodejs14-slim and the nodejs16-slim images, using the nodejs package from the components.

One importaant thing to stress is that both images also include npm, so they can be used in development as well.

I've build and published the nodejs14-slim and the nodejs16-slim images, using the nodejs package from the components.

One importaant thing to stress is that both images also include npm, so they can be used in development as well.

I can't find these images in https://docker-registry.wikimedia.org/ yet. Is there a build and push step that still needs to be done to publish them?

I've build and published the nodejs14-slim and the nodejs16-slim images, using the nodejs package from the components.

One importaant thing to stress is that both images also include npm, so they can be used in development as well.

I can't find these images in https://docker-registry.wikimedia.org/ yet. Is there a build and push step that still needs to be done to publish them?