fix(files_trashbin): make trashbin:expire continue on errors - #65016
Merged
Merged
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
benjaminfrueh
requested review from
CarlSchwan,
come-nc,
icewind1991,
leftybournes and
salmart-dev
and removed request for
a team
October 2, 2026 13:57
Contributor
Author
|
/backport to stable35 |
Contributor
Author
|
/backport to stable34 |
CarlSchwan
approved these changes
Oct 2, 2026
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since version 34
occ trashbin:expirehad three potential issues introduced by the refactor in #54876After successfully expiring an existing user, the command outputs
Unknown user <uid>, returns 1 and aborts after the first user.server/apps/files_trashbin/lib/Command/ExpireTrash.php
Lines 66 to 71 in 463c9bd
getTrashRoot()uses->get('files_trashbin')which throwsNotFoundExceptionif the folder doesn't exist, this should not be an error and not abort the job as the trashbin seems to be created on a users first delete.Errors in
expireTrashForUser()are rethrown so the loop aborts and every user after the failing one is skipped. Before refactor: Commands and background jobs for the trashbin #54876 the errors were logged and the loop continued.server/apps/files_trashbin/lib/Command/ExpireTrash.php
Lines 95 to 97 in 463c9bd
Feedback or further suggestions welcome.
Checklist
3. to review, feature component)stable32)AI (if applicable)