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

Sandbox/CI: Update to Node.js 18 #797

Merged
merged 2 commits into from
Dec 12, 2022
Merged

Sandbox/CI: Update to Node.js 18 #797

merged 2 commits into from
Dec 12, 2022

Conversation

amotl
Copy link
Member

@amotl amotl commented Dec 2, 2022

About

Following up on #796, this patch updates the sandbox/build/CI environment to use Node.js 18.

Caveats

NODE_OPTIONS=--openssl-legacy-provider was needed to satisfy webpack@4.

The real solution is to update to webpack@5.

@amotl
Copy link
Member Author

amotl commented Dec 2, 2022

Why is npm install on Node.js 18 so much slower on CI, even when using a warm package cache?

Node.js 16

added 1232 packages, and audited 1233 packages in 16s

-- https://github.com/crate/crate-admin/actions/runs/3603406093/jobs/6071565432#step:4:28

Node.js 18

added 1232 packages, and audited 1233 packages in 2m

-- https://github.com/crate/crate-admin/actions/runs/3603697467/jobs/6072416418#step:4:28

Even without auditing, and a warm package cache, it still takes 2 minutes to install the dependencies.

added 1233 packages in 2m

-- https://github.com/crate/crate-admin/actions/runs/3603937631/jobs/6072776069#step:3:26
-- https://github.com/crate/crate-admin/actions/runs/3603937631/jobs/6072776069#step:5:1
-- https://github.com/crate/crate-admin/actions/runs/3603937631/jobs/6072776069#step:5:45

`NODE_OPTIONS=--openssl-legacy-provider` is needed to satisfy webpack4.
The real solution is to update to webpack5.
@amotl amotl force-pushed the amo/nodejs-18 branch 2 times, most recently from 5581844 to f894d08 Compare December 12, 2022 15:16
@amotl
Copy link
Member Author

amotl commented Dec 12, 2022

It looks like the slowness was related to the attempt to upgrade to NPM 9.x, with 90eb385. The run 3677157095 1 shows that without it, Install packages is back to 17s. 💯

Footnotes

  1. https://github.com/crate/crate-admin/actions/runs/3677157095/jobs/6218786856

It is deprecated, and already set to `none`.

> The configuration uses the deprecated rebase_fallback mode of the queue action.
> The default value will be changed and forced to none on 13th December, 2022.
@amotl amotl marked this pull request as ready for review December 12, 2022 15:40
@amotl amotl merged commit 81b04c8 into main Dec 12, 2022
@amotl amotl deleted the amo/nodejs-18 branch December 12, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants