[nodejs] use npm ci to speed up docker builds#6812
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a47ebf6f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
was there no package.json before ? how were the dependencies installed ? whaaat ?
There was a problem hiding this comment.
They were installed manually with npm install <pkg>@<version>, which means going through a whole new resolve again, regenerating the lockfile, redownloading some dependencies, etc. It was very inefficient.
| // Disabled because standalone mode does not support using modules directly | ||
| // from node_modules which is necessary when using `npm link dd-trace`. | ||
| // output: 'standalone' | ||
| outputFileTracing: false |
There was a problem hiding this comment.
"Output File Tracing is a Next.js feature (introduced in version 12) that automatically analyzes your application during the next build process to determine exactly which files and dependencies are required to run a production server."
For our purpose, it just takes double the time for no benefit.
simon-id
left a comment
There was a problem hiding this comment.
Preemptive approval because i'm going in vacations tonight but please respond to my comments
Motivation
Using
npm installand then install static versions manually afterwards is much slower than just having everything in the lockfile and usingnpm ci.Changes
Use
npm cito speed up docker builds.Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present