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

ci: update test workflow and expand test matrix #1086

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

dsanders11
Copy link
Member

Supersedes #1060
Supersedes #1085 (this PR tests a larger matrix of versions, including on macOS and Windows)

This was a real headache of conflicting bugs but managed to get a config that goes green for the full matrix:

  • Tests against Node.js 20.2.0 because 20.3.0 has a bug (see comment in ci: Test current versions of Node.js #1085) - also works around a panic in nvm-windows when installing 20.3.0
  • Uses the win/server-2022 executor because win/vs2019 is no longer updated and has an old nvm-windows version which has a bug with npm versions
  • Enables long paths on Windows because with the win/server-2022 executor the path of files being compiled ended up being too long 🤷
  • The Windows builds are unfortunately flaky due to hitting the race condition in fix: extract tarball to temp directory on Windows nodejs/node-gyp#2846 and I don't have a good fix at the moment - ideally we should work around that bug in this project since it will be a while before the node-gyp fix makes its way to most users

cc @cclauss, sorry to supersede your PR (but thanks for putting in the work!), but I've been meaning to update the CI config here for a while, these changes pull it closer to our other @~electron/wg-ecosystem repos and pick up other needed changes from #1060.

@dsanders11 dsanders11 requested a review from a team as a code owner June 14, 2023 08:20
Comment on lines +93 to +94
- 14.21.3
- 12.22.12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why continue to support and encourage the use of end-of-life versions of Node.js? If users want support then they can try to reproduce their problems on a supported version. If folks are paying for long-term support for an OS that has an EOL version of Node.js then their OS provider can support them. If folks are using an OS that is beyond the standard support and are not paying for LTS, then their problems should be demonstrated on supported versions. Building on secure platforms and being able to use new language optimizations and features helps everyone's safety and velocity so let's encourage security and performance upgrades.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package has an engine version that supports Node.js v12 and above, so dropping support would be a breaking change (and require a major version bump on this package). Any major version bump causes fragmentation with the user base, as can be seen in the npm downloads stats for older versions of this package (it used to be called just electron-rebuild) where there are still ~6k downloads/week on the final 2.y.z version and ~7.5k downloads/week on the final 1.y.z version. We want to avoid furthering that fragmentation, so we don't want to bump majors more often than we need to (which every Node.js EOL would require). These packages also don't have a ton of maintainer time to put into them, so it takes some time for things to be merged - if we bump the major version we might make the safety issue worse by putting new fixes behind a new major version where they won't be picked up by some subset of the user base. For ease of maintenance these packages aren't setup to do additional releases to old majors, so once we bump majors there are no more fixes being backported to old majors (and we would need the CI to be testing the old Node.js versions those majors support to be able to do so).

So the general policy of @~electron/wg-ecosystem is to continue to test and not explicitly drop older Node.js versions unless necessary. We're not encouraging the usage of EOL versions of Node.js, more avoiding breaking them when feasible. In most cases we won't go out of our way to fix bugs which only affect those EOL versions, and if a future change requires dropping support for older EOL versions of Node.js we will explicitly drop support then, if it's deemed necessary.

Hope this makes sense. 🙂

Copy link
Contributor

@cclauss cclauss Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users of legacy software create a lot of noise in support channels...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that noise really go away if this package stops testing those EOL Node.js versions, though? Even if we drop support and bump the major, some users will stick on the current major (as seen in the npm download stats listed above).

If you tweak the GitHub search to include created:>2022-01-01, it only returns 16 issues in the past 18 months, and without going beyond flipping through the descriptions shown on the search page, at least 3 of them were reporting supported Node.js versions.

It's also worth noting that node-gyp itself is still showing Node.js v12 and v14 as supported engines according to package.json: https://github.com/nodejs/node-gyp/blob/33391db3a0008eff8408890da6ab232f2f90fcab/package.json#L37-L39

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that noise really go away if this package stops testing those EOL Node.js versions?

Rephrase: Will that noise decrease if this package stops encouraging / supporting EOL Node.js versions?

Yes, it will. Developers are improving software and ignoring their efforts is suboptimal on many different levels. Solutions that used to work in older versions of npm, node, and gyp no longer work today. Supporting both legacy and current is complex, frustrating, and error-prone. Doing so for the sake of statistics is a shame.

Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: 👍 Nice work here!

@dsanders11 dsanders11 merged commit ce2d100 into main Jun 22, 2023
@dsanders11 dsanders11 deleted the modernize-circleci-config branch June 22, 2023 18:13
@dsanders11 dsanders11 mentioned this pull request Jun 25, 2023
@continuous-auth
Copy link

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants