-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle errors when Copying Project Folders when the Storage is broken #15893
Conversation
Updates Nextcloud to use the same interface
3226cba
to
a767385
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the auth rework of those commands. Just a question left.
@@ -33,28 +33,27 @@ module Nextcloud | |||
class CopyTemplateFolderCommand | |||
using ServiceResultRefinements | |||
|
|||
def self.call(storage:, source_path:, destination_path:) | |||
new(storage).call(source_path:, destination_path:) | |||
def self.call(auth_strategy:, storage:, source_path:, destination_path:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 good thing I saw that now, was going to start with that command almost myself.
@@ -42,6 +42,7 @@ def perform(source:, target:, work_packages_map:) | |||
user = batch.properties[:user] | |||
|
|||
project_folder_result = results_from_polling || initiate_copy(target) | |||
project_folder_result.on_failure { |failed| return log_failure(failed) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ so, this is the actual fix, the rest is boyscouting, right? Or did I miss another piece of changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this is the entire fix, the rest was just a case of "Ok, since I'm here already..."
Related WP: OP#55805
What?
I hadn't handled the issue of trying to copy a project folder on a broken storage. This PR aims to fix that.
How?
Well... by handling the service result failure. =/
This PR also:
auth_strategy
toCopyTemplateFolder
CopyTemplateFolder