fix(settings): update all button only updates a single app
- 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)
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)
@susnux @CarlSchwan any chance this can be merged?