Skip to content

Conversation

@tmlmt
Copy link
Contributor

@tmlmt tmlmt commented Nov 15, 2025

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 update function fed to p-limit's limit() 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/await and Promises.all in updateAll() 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

@tmlmt tmlmt requested a review from a team as a code owner November 15, 2025 02:30
@tmlmt tmlmt requested review from nfebe, sorbaugh and szaimen and removed request for a team November 15, 2025 02:30
@tmlmt tmlmt changed the title fix: update all button only updates a single app fix(settings): update all button only updates a single app Nov 15, 2025
@szaimen szaimen added bug 3. to review Waiting for reviews labels Nov 15, 2025
@szaimen szaimen added this to the Nextcloud 33 milestone Nov 15, 2025
@szaimen szaimen requested review from andrey18106 and susnux and removed request for szaimen November 15, 2025 07:27
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense but I am not sure the problem is really fixed by that? Anyways thats a good semantic code fix

@github-actions
Copy link
Contributor

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.)

@DaphneMuller
Copy link

@susnux @CarlSchwan any chance this can be merged?

@szaimen
Copy link
Contributor

szaimen commented Jan 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Update all button only updates a single app

7 participants