Skip to content

Conversation

@tmlmt
Copy link

@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

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

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants