spike: update node 16 to node 18#2067
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
davehakkens
left a comment
There was a problem hiding this comment.
Thanks for all the work on this Chris.
Updated Node to 18, did a yarn start and it all works.
Very smooth, seems good here!
evakill
left a comment
There was a problem hiding this comment.
wasn't getting the print statements on yarn start - found a console.log that needed to be pulled out of the if/else in the envCheck
otherwise, LGTM and runs smoothly when using node 18 🎉
Co-authored-by: Eva Killenberg <eva@replicahq.com>
|
Think this one is (finally) good to go. @davehakkens I'll give a double-check to the deployed dev sites post-merge, but if you could give me a heads up when you are planning to make the next release and I wouldn't mind also quickly checking the production sites at the same time (around most this weekend or Monday on my usual timezone). |
|
they al seems to work well @chrismclarke. Feel free the push the release at your convience, so you can double check. |
|
🎉 This PR is included in version 1.35.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
@chrismclarke are the deployed instances all upgraded to Node 18 now as well? If so can we remove the node 16 build job from the CircleCI workflow? |
|
They should all be, I had kept in when planning to keep the node 18 usage optional but now its enforce fine to get rid. |
PR Checklist
PR Type
Description
Add support for using Node 18. Note this is quite tricky due to the number of incompatibilities with webpack/node at different versions, and the way the monorepo is setup to handle specific package resolutions (see linked issue).
This PR aims to update everything to add compatibility for Node 18, and to migrate all of our cloud processes to use node 18 as a default. In addition it adds a prompt for local developers to try and match their environment to our recommendations
Dev Notes
We have numerous workspaces that all are pretty much all built using webpack, but in different ways (frontend via react-scripts, functions manual implementation, e2e tests via cypress, components storybook, docs via docusaurus). Some of these are setup to use webpack 4, others webpack 5. Trying to get everything upgraded to the newer version is a pain due to the large number of breaking changes, and the ways different packages either do or do not expose means to override configurations.
I think that I've now managed to update all the workspaces and resolve any identified issues to work with node 18 across the board. In the future we may want to consider restructuring the repo to keep better separation across workspaces (namely moving the platform frontend code away from the root folder), and possibly reconsidering some of our tooling options (particularly CRA which really failed in its support for webpack 5 and incredibly slow updates)
Review Notes
The automated tests should have caught any critical issues when migrating, however would be good to specifically check:
Checkout branch and try to run the platform (e.g.
yarn start). It should prompt you to update version of node if you're not already running node 18. Be good to know how this experience is (are instructions clear? do things work?). Note the documentation page linked is updated in this PR so won't be entirely accurateOnce merged would also be good to check for any deployment issues and to check functions working as expected on dev site (e.g. adding vote to howto)
Followup-tasks
Tasks
Docs
CI
https://github.com/CircleCI-Public/cimg-node/pull/313)ci=falseand node_options from build-context (included locally instead)Frontend
https://github.com/transloadit/uppy/issues/3376)Functions
Storybook
Cypress E2E
Emulators
https://github.com/micrometer-metrics/micrometer/issues/2776)https://github.com/facebook/create-react-app/discussions/11767)Misc
Git Issues
Closes #2057
Screenshots/Videos
Message shown to users using older versions of node

Additional CI tests for legacy and next node versions (passing)

https://app.circleci.com/pipelines/github/ONEARMY/community-platform/3644/workflows/76bb0c89-3acb-4d31-a7ac-654639a643c6
What happens next?
Thanks for the contribution! We try to make sure all PRs are reviewed ahead of a monthly dev call (first Monday of the month, open to all!).
If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.
If you need more immediate feedback you can try reaching out on Discord in the Community Platform
developmentchannel.