odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
806 stars 260 forks source link

Presentation server docker build fails (master) #3977

Closed planetf1 closed 3 years ago

planetf1 commented 3 years ago
 ---> Running in 8b05976a9d34
17:15:26,625 [INFO] npm notice
17:15:26,625 [INFO]
17:15:26,625 [INFO] npm notice New patch version of npm available! 7.0.3 -> 7.0.5
17:15:26,626 [INFO] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.5>
17:15:26,626 [INFO] npm notice Run `npm install -g npm@7.0.5` to update!
17:15:26,626 [INFO] npm notice
17:15:26,626 [INFO]
17:15:26,627 [INFO] npm ERR! code ERESOLVE
17:15:26,627 [INFO]
17:15:26,629 [INFO] npm ERR! ERESOLVE unable to resolve dependency tree
17:15:26,629 [INFO]
17:15:26,629 [INFO] npm ERR!
17:15:26,630 [INFO] npm ERR! While resolving: presentation-server@1.0.0
17:15:26,630 [INFO] npm ERR! Found: eslint@6.8.0
17:15:26,630 [INFO] npm ERR! node_modules/eslint
17:15:26,630 [INFO] npm ERR!   dev eslint@"^6.6.0" from the root project
17:15:26,630 [INFO] npm ERR!
17:15:26,631 [INFO] npm ERR! Could not resolve dependency:
17:15:26,631 [INFO] npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from eslint-config-airbnb@17.1.1
17:15:26,631 [INFO] npm
17:15:26,632 [INFO]  ERR! node_modules/eslint-config-airbnb
17:15:26,632 [INFO] npm ERR!   dev eslint-config-airbnb@"^17.0.0" from the root project
17:15:26,633 [INFO] npm ERR!
17:15:26,633 [INFO] npm ERR! Fix the upstream dependency conflict, or retry
17:15:26,633 [INFO] npm ERR! this command with --force, or --legacy-peer-deps
17:15:26,634 [INFO] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
17:15:26,634 [INFO] npm ERR!
17:15:26,635 [INFO] npm ERR! See /home/node/.npm/eresolve-report.txt for a full report.
17:15:26,635 [INFO]
17:15:26,648 [INFO]
17:15:26,648 [INFO]
17:15:26,648 [INFO] npm ERR! A complete log of this run can be found in:
17:15:26,649 [INFO] npm ERR!     /home/node/.npm/_logs/2020-10-27T17_15_26_633Z-debug.log
17:15:26,649 [INFO]
17:15:26,982 [ERROR] The command '/bin/sh -c npm install' returned a non-zero code: 1
planetf1 commented 3 years ago

cc: @davidradl . Am looking ....

planetf1 commented 3 years ago

This was caused by a missing package-lock.json -- if this is included the 'npm install' completes successfully (and this preserves use of the same versions as the build)

planetf1 commented 3 years ago

I have seen this resurface:


8:05:15,152 [INFO]  ---> Running in 7e0003f87ef3
18:05:19,030 [INFO] npm notice
18:05:19,030 [INFO] npm notice New patch version of npm available! 7.0.3 -> 7.0.6
18:05:19,031 [INFO] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.6>
18:05:19,031 [INFO] npm notice
18:05:19,031 [INFO]  Run `npm install -g npm@7.0.6` to update!
18:05:19,031 [INFO] npm notice
18:05:19,031 [INFO]
18:05:19,031 [INFO] npm ERR! code ERESOLVE
18:05:19,031 [INFO]
18:05:19,032 [INFO] npm ERR! ERESOLVE unable to resolve dependency tree
18:05:19,032 [INFO] npm ERR!
18:05:19,032 [INFO]
18:05:19,032 [INFO] npm ERR!
18:05:19,032 [INFO]  While resolving: presentation-server@1.0.0
18:05:19,032 [INFO] npm
18:05:19,032 [INFO] ERR! Found: eslint@6.8.0
18:05:19,032 [INFO] npm ERR!
18:05:19,033 [INFO]  node_modules/eslint
18:05:19,033 [INFO]
18:05:19,033 [INFO] npm ERR!   dev eslint@"^6.6.0" from the root project
18:05:19,033 [INFO] npm ERR!
18:05:19,034 [INFO] npm ERR!
18:05:19,034 [INFO]  Could not resolve dependency:
18:05:19,034 [INFO] npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from eslint-config-airbnb@17.1.1
18:05:19,034 [INFO] npm ERR! node_modules/eslint-config-airbnb
18:05:19,035 [INFO] npm
18:05:19,035 [INFO] ERR!   dev eslint-config-airbnb@"^17.0.0" from the root project
18:05:19,035 [INFO] npm ERR!
18:05:19,035 [INFO] npm ERR!
18:05:19,035 [INFO]  Fix the upstream dependency conflict, or retry
18:05:19,035 [INFO] npm ERR!
18:05:19,071 [INFO]  this command with --force, or --legacy-peer-deps
18:05:19,071 [INFO] npm ERR!
18:05:19,072 [INFO]  to accept an incorrect (and potentially broken) dependency resolution.
18:05:19,072 [INFO]
18:05:19,072 [INFO] npm
18:05:19,072 [INFO]  ERR!
18:05:19,072 [INFO] npm ERR! See /home/node/.npm/eresolve-report.txt for a full report.
18:05:19,072 [INFO]
18:05:19,072 [INFO]
18:05:19,072 [INFO] npm ERR! A complete log of this run can be found in:
18:05:19,073 [INFO] npm
18:05:19,073 [INFO]  ERR!
18:05:19,073 [INFO]      /home/node/.npm/_logs/2020-10-30T18_05_19_175Z-debug.log
18:05:19,073 [INFO]
18:05:19,403 [ERROR] The command '/bin/sh -c npm install' returned a non-zero code: 1

cc: @davidradl @grahamwallis

This is also affecting the merge build meaning that our docker images are not being published, though release 2.4 is still ok

planetf1 commented 3 years ago

This was probably introduced in a change from use of node:14-alpine to node:15-alpine as the base image

Node 14 is the current LTS, but I accepted a proposed Node 15 update - latest supported version.

For now propose backing off to node 14

grahamwallis commented 3 years ago

I have read the above warnings/errors forwards and backwards and examined as many occurrences of aslant version specification as I can find, and I still don't understand what the error is trying to tell us. It looks like many node modules depend on at least 4.19.1 or at least 5.3.0, or at least 6.6.0, and we pull in 6.8.0. What's not to like?

planetf1 commented 3 years ago

This is now fixed in that the node-15 was backed off to 14 - which is the current LTS & therefore IMO the most appropriate version to go with I haven't looked into the specifics in detail, figured node was best left to the experts ;-)

So, no action is required now - builds ok now that #4035 is merged -> https://dev.azure.com/ODPi/Egeria/_build?definitionId=12

grahamwallis commented 3 years ago

That's fine. I think it will become necessary for us to understand this area better than I do currently, so I have been spending a little time educating myself on the more intricate aspects of dependency specification - which is much more involved than I had expected.

On a general note I would be very cautious about accepting suggested updates to the overall node version - it has rather wide-reaching consequences, so whenever we do update it we will need to perform a fairly comprehensive review and test.

planetf1 commented 3 years ago

Yes, I think that node is an example of a core runtime (like java) that we should probably focus on the LTS versions, and take the overall level change carefully.