etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

For Etherpad 1.7, require node 6.9. Since 1.8, require node 8.9 minimum

Open muxator opened this issue 8 years ago • 9 comments

A recent issue (#3401) suggests that when using Node <= 4 the application works (edit: as of 1.6.6, it no longer does), but plugins do not get installed. Upgrading to Node 6 solved that specific issue.

Maybe we should decide what is the minumim required Node version, and be clear about that.

installDeps.sh checks for Node >= 0.10:

https://github.com/ether/etherpad-lite/blob/7c971f24aa775f511ad977b8f1ff347ed22f56d0/bin/installDeps.sh#L51

but probably we should reconsider: Node 6 is currently the oldest supported version (going out of support on April 2019).

Using a more recent Node version could probably give us the possibility of modernizing the codebase, too (for example: async/await vs callbacks).

muxator avatar Jul 16 '18 15:07 muxator

There was an old issue (#3074) about Etherpad not working on node > 7, but I guess that's fixed, according to your recent comments on issues of this project, @muxator .

Regarding upgrading the required Node version, I don't know what is the best approach on projects like Etherpad (already in PROD for a long time, supporting multiple environments, etc). Should we use try to focus on the most recent version, in order to provide a more stable code for a longer time?

lpagliari avatar Jul 16 '18 16:07 lpagliari

That would be my inclination: following platform upgrades & deprecations would give us guidance on how to prioritize maintenance work.

Apparently node 7 compatibility was fixed in release 1.6.1 (milestone, changelog).

I am currently able to run & pass the backend tests with node 7.9.0, 8.11.3, 9.9, 10.6. This could still mean that the test suite does not cover enough cases, however... :)

p.s.: actually, I lied: as of f2b5f3bca2bb (the future 1.7) there is a failure introduced by #3268. But it is independent on our matter of interest here.

muxator avatar Jul 16 '18 23:07 muxator

What about trying to focus on the last version of the current LTS (8, currently 8.11.3)?

There are a lot of other possibilities (including going bleeding edge, or LTS + bleeding edge, or >= LTS), but maybe keeping it simple & clear could help attaining stability.

The next release will be 1.7. We could start requiring a new node version from there. Or we can deprecate, inform the users, and start requiring a new version with 1.8.

I have no strong opinion on this yet, just want to have some discussion.

muxator avatar Jul 16 '18 23:07 muxator

Just as a suggestion: Debian/stable (stretch) has a backport of Debian/testing (stretch-backports) with version 8.11.1 -> https://packages.debian.org/search?keywords=nodejs

deb.nodesource.com comes with version 10.7 for Debian/stable (stretch) -> https://deb.nodesource.com/node_10.x/dists/stretch/main/binary-amd64/Packages

ukcb avatar Jul 18 '18 10:07 ukcb

Thanks for the info, @ukcb.

When trying to run on Node <= 5, current Etherpad does not start already:

[2018-07-26 22:55:38.316] [ERROR] console - ERROR: npm is known not to run on Node.js v4.4.7
[2018-07-26 22:55:38.322] [ERROR] console - You'll need to upgrade to a newer version in order to use this
[2018-07-26 22:55:38.323] [ERROR] console - version of npm. Supported versions are 6, 8, 9, 10, 11. You can find the
[2018-07-26 22:55:38.323] [ERROR] console - latest version at https://nodejs.org/

This fixes a hard dependency on Node >= 6.

Edit: opened PR #3431 to require node 6.9.0 (and deprecate it already).

muxator avatar Jul 26 '18 21:07 muxator

Here's the support & deprecation plan for the Node runtime for Etherpad 1.7 and 1.8:

Etherpad 1.6.6 does not run on node <= 5 already. Node 6.9 is the first LTS release in the 6 series (EOL April 2019). The current supported LTS release series is 8 (EOL December 2019).

Node version Etherpad 1.6.6 Etherpad 1.7 Etherpad 1.8
V <= 5 Does not run already Won't run.
Will print an ERROR and exit
Won't run.
Will print an ERROR and exit
6.9 <= V < 8 Works Will run.
Will print a deprecation WARNING (support to be removed in 1.8).
Will use polyfills to shim missing features
Won't run.
Will print an ERROR and exit
V >= 8 Works Will run Will run

Work happens in PR #3432.

For Node support status, see: https://github.com/nodejs/Release

muxator avatar Jul 26 '18 23:07 muxator

If there are no doubts, I am going to merge #3432 this weekend, officializing these choices.

muxator avatar Jul 28 '18 01:07 muxator

Closed with #3432.

muxator avatar Jul 28 '18 21:07 muxator

A recap on this:

To free resources for development on #3540 (migrate from callback-style to async programming), Etherpad 1.7.5 was released on 2019-01-26. That one will be the last version that runs on Node 6.x.

The first Node LTS version that supports async/await is Node 8, which nicely fits with our plan.

Thus: next version will be 1.8.0, it will get rid of callback hell, and will require Nodejs 8.9 (the first LTS version in branch 8.x).

muxator avatar Feb 18 '19 23:02 muxator