Skip to content

Properly catch NoUserException during upload cleanup - #20284

Merged
rullzer merged 2 commits into
masterfrom
bugfix/noid/catch-no-user-in-cron
Apr 4, 2020
Merged

Properly catch NoUserException during upload cleanup#20284
rullzer merged 2 commits into
masterfrom
bugfix/noid/catch-no-user-in-cron

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Apr 3, 2020

Copy link
Copy Markdown
Member

Follow up to #19655

getUserFolder might throw a NoUserException if the job was scheduled before the user removal. This would cause the background job to never succee and causing Backends provided no user object errors.

The second commit adds proper annotations for the exceptions being thrown by getUserFolder.

@@ -66,6 +67,9 @@ protected function run($argument) {
} catch (NotFoundException $e) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
} catch (NotFoundException $e) {
} catch (NotFoundException|NoUserException$e) {

Does the same, without the duplication :)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Ah right, fixed 👍

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Despite my nitpick this looks good :)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
juliusknorrforce-pushed the bugfix/noid/catch-no-user-in-cron branch from d424e0c to 56aa8fdCompareApril 3, 2020 21:06
@juliusknorrjuliusknorr added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 3, 2020
@rullzer
rullzer merged commit 5c6f9ca into masterApr 4, 2020
@rullzer
rullzer deleted the bugfix/noid/catch-no-user-in-cron branch April 4, 2020 08:25
@rullzerrullzer mentioned this pull request Apr 4, 2020
80 tasks
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable17

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable16

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable18 in #20334

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable17 failed. Please do this backport manually.

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable16 failed. Please do this backport manually.

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

Labels

4. to releaseReady to be released and/or waiting for tests to finishbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@juliusknorr@rullzer@ChristophWurst