server
server copied to clipboard
fix(settings): update all button only updates a single app
- local branch for #56469
- Resolves: #51318
Summary
Previously, the chain of functions involved in the "update all apps" routine were not properly setup up with regards to asynchronism:
- The promises generated by
updateAll()were not awaited or managed properly - The
updatefunction fed top-limit'slimit()utility was returning void and not a promise, as it expects (see docs)
This was causing the mechanism driving the updates to potentially end prematurely.
This PR fixes this by:
- Properly using
async/awaitandPromises.allinupdateAll()to ensure all promises generated by p-limit are awaited and executed completely before the function finishes. - Making
update()return the promises it involves
This would prevent the function from exiting prematurely and ensure all updates are processed automatically.
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)
- [ ] Labels added where applicable (ex: bug/enhancement,
3. to review, feature component) - [ ] Milestone added for target branch/version (ex: 32.x for
stable32)
@AndyScherzinger DCO is red. Can we still merge this?
@szaimen I fixed the DCO 👍