ioBroker.js-controller icon indicating copy to clipboard operation
ioBroker.js-controller copied to clipboard

Make iobroker upgrade all run a single npm command instead of one per adapter

Open AlCalzone opened this issue 3 years ago • 4 comments

Currently, iobroker upgrade all runs npm install adapter@version ... for each adapter that needs upgrading. This causes npm to try and compile optional dependencies multiple times.

We could merge all commands into one and have npm run only once:

npm i adapter1@version1 adapter2@version2 ... --loglevel error --prefix /opt/iobroker

After that command is complete, all uploads could be done in batch.

AlCalzone avatar Jul 14 '20 21:07 AlCalzone

If it fails, we should fall back to separate invocations, so that at least most of the adapters get upgraded.

AlCalzone avatar Jul 15 '20 06:07 AlCalzone

Now where we have our new questionnaire we would need to ask all questions first, and after that starting to upgrade the adapters. I think this will also relax situations like https://github.com/ioBroker/ioBroker.js-controller/issues/1178

So basically, ask all questions and push all yes adapters into an array, npm install the whole list in one command, and then upload the list.

foxriver76 avatar Jan 19 '21 17:01 foxriver76

How we can detect if a single adapter out of 20 makes problems and npm cancels? I would not do it honestly

Apollon77 avatar Jan 19 '21 21:01 Apollon77

Did you read my last comment? If the compound npm process fails with any exit code, we can fall back to invoking them separately.

AlCalzone avatar Jan 19 '21 22:01 AlCalzone