Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
muxator opened this issue Jul 16, 2018 · 9 comments
Closed
Labels
async-migration Migration from callback-style programming to async functions packaging security stale code
Milestone

Comments

@muxator
Copy link
Contributor

muxator commented Jul 16, 2018

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:

if [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ] && [ ! $NODE_V_MINOR = "v0.12" ] && [ ! $NODE_V_MAIN -ge 4 ]; then

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).

@lpagliari
Copy link
Contributor

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?

@muxator
Copy link
Contributor Author

muxator commented Jul 16, 2018

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 f2b5f3b (the future 1.7) there is a failure introduced by #3268. But it is independent on our matter of interest here.

@muxator
Copy link
Contributor Author

muxator commented Jul 16, 2018

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 muxator added this to the 1.7 milestone Jul 16, 2018
@ukcb
Copy link

ukcb commented Jul 18, 2018

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

@muxator
Copy link
Contributor Author

muxator commented Jul 26, 2018

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
Copy link
Contributor Author

muxator commented Jul 26, 2018

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
Copy link
Contributor Author

muxator commented Jul 28, 2018

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

@muxator
Copy link
Contributor Author

muxator commented Jul 28, 2018

Closed with #3432.

@muxator muxator closed this as completed Jul 28, 2018
@muxator muxator changed the title Minimum supported node version? For Etherpad 1.7, require node 6.9. Since 1.8, require node 8.9 minimum Aug 21, 2018
@muxator
Copy link
Contributor Author

muxator commented Feb 18, 2019

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).

This was referenced Feb 18, 2019
muxator added a commit that referenced this issue Feb 19, 2019
Next version will be Etherpad 1.8. As planned in #3424, we are going to require
NodeJS >=8.9.0 and npm >= 6.4.

This commit implements that change and updates documentation and scripts.
Subsequent changes will get rid of old idioms, dating back to node < 0.7, that
still survive in the code.
Once migrated to NodeJS 8, we will be able to start working on migrating the
code base from callbacks to async/await, greatly simplifying legibility (see
#3540).

Closes #3557
@muxator muxator added the async-migration Migration from callback-style programming to async functions label Feb 28, 2019
muxator added a commit that referenced this issue Oct 19, 2019
When nodejs 8.9.0 was released, its bundled npm version was 5.5.1 (see
https://nodejs.org/en/download/releases). It makes sense that we lover our
requirement to that version.

Please note that the npm version mentioned here does not refer to the npm
library installed as Etherpad dependency in node_modules via package.json
(which indeed is higher) but is merely the npm version used to bootstrap the
installation when running installDeps.sh.

This change amends 9d35d15 and its planning issue - #3424 - which were too
strict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async-migration Migration from callback-style programming to async functions packaging security stale code
Projects
None yet
Development

No branches or pull requests

3 participants