[BUILD-757] Renovate is unable to update node library version Created: 26/Apr/22 Updated: 20/Jun/22 Resolved: 01/Jun/22 |
|
| Status: | Closed |
| Project: | Build |
| Component/s: | Poms |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Roberto Gomez | Assignee: | Roberto Gomez |
| Resolution: | Workaround exists | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Epic Link: | Renovate | ||||||||
| Team: | |||||||||
| Description |
|
Some PR from renovate are failing for MODULES/frontend-helpers project. For instance, https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/pull-requests/117/overview
|
| Comments |
| Comment by Roberto Gomez [ 29/Apr/22 ] |
|
After renaming the previously faulty PRs with 'rebase!' prefix Renovate reprocessed them again, this time without errors. |
| Comment by Roberto Gomez [ 25/May/22 ] |
|
Some PR are failing again. For example, MODULES/frontend-helpers - Pull request #138 .
Relevant EC2 instance logs discovered after Renovate execution: lerna notice cli v4.0.0 lerna info Bootstrapping 7 packages lerna info Installing external dependencies lerna ERR! npm install --ignore-scripts --ignore-scripts --no-audit --package-lock-only exited 254 in 'angular-sample' lerna ERR! npm install --ignore-scripts --ignore-scripts --no-audit --package-lock-only stderr: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! npm WARN checkPermissions Missing write access to /tmp/renovate/repos/bitbucket-server/MODULES/frontend-helpers/samples/angular-sample/node_modules/@magnolia/angular-editor npm ERR! code ENOENT npm ERR! syscall access npm ERR! path /tmp/renovate/repos/bitbucket-server/MODULES/frontend-helpers/samples/angular-sample/node_modules/@magnolia/angular-editor npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, access '/tmp/renovate/repos/bitbucket-server/MODULES/frontend-helpers/samples/angular-sample/node_modules/@magnolia/angular-editor' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /tmp/renovate/cache/others/npm/_logs/2022-05-25T02_04_52_495Z-debug.log lerna ERR! npm install --ignore-scripts --ignore-scripts --no-audit --package-lock-only exited 254 in 'angular-sample' lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
|
| Comment by Roberto Gomez [ 25/May/22 ] |
|
It is possible to consistently reproduce the error running the following commands within MODULES/frontend-helpers root
npm install --ignore-scripts --no-audit --package-lock-only // First time lerna is runned without errors lerna bootstrap --no-ci --ignore-scripts -- --ignore-scripts --no-audit --package-lock-only // Second time lerna fails lerna bootstrap --no-ci --ignore-scripts -- --ignore-scripts --no-audit --package-lock-only
Somehow it looks related to the node/npm version, because this configuration fails
$ lerna info
lerna notice cli v4.0.0
Environment info:
System:
OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (8) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.19.1 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 6.14.16 - /usr/local/bin/npm
Utilities:
Git: 2.35.1 - /usr/bin/git
But, this other one works without errors
$ lerna info
lerna notice cli v4.0.0 Environment info: System:
OS: macOS 12.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 17.9.0 - ~/.nvm/versions/node/v17.9.0/bin/node
npm: 8.7.0 - ~/.nvm/versions/node/v17.9.0/bin/npm
Utilities:
Git: 2.32.1 - /usr/bin/git
|
| Comment by Roberto Gomez [ 27/May/22 ] |
|
There is already a request to update the node version packed in the renovate/renovate docker image: New image with node v16 (LTS) #374 |
| Comment by Roberto Gomez [ 01/Jun/22 ] |
|
In summary, the issue comes from lerna's first execution changing package.json file version to 1, which leads to failures in successive executions. Updating node version solves the issue. There is a request to update node version in the official renovate docker image, but there seems to be some issues preventing this to happen, yet. Since oficial image is not updated with a more recent node version, it seems too complicated to accomplish that ourselves. We've found a workaround which is to limit renovate's PR to one. This way lerna is executed just once. Right now this is good enough.
|