-
Notifications
You must be signed in to change notification settings - Fork 60
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
[UX] Print better error message when transfer validation fails #535
Conversation
catch TransferFailedException
@liuxt129 Before you merge, can you take a look and see why it says "Transfer successfully completed" and then immediately prints "Transfer failed exception"? Also, the error message should be more descriptive and say something like "The following objects were not found at the destination" |
The "Transfer successfully completed" message is printed in function launch_replication_job in cp_replicate.py, before the verify is done. If we don't want this to happen, I think we can move the success message part from cp_replicate.py to cli.py, after the verify passes. We have everything we need for the success message from |
report transfer_failed; descriptive error msg
f8adb0a
to
b09be68
Compare
skyplane/exceptions.py
Outdated
@@ -41,7 +41,7 @@ def __init__(self, message, failed_objects=None): | |||
def pretty_print_str(self): | |||
err = f"[red][bold]:x: TransferFailedException:[/bold] {str(self)}[/red]" | |||
if self.failed_objects and len(self.failed_objects) > 0: | |||
err += "\n[bold][red]Failed objects:[/red][/bold] " + str(self.failed_objects) | |||
err += "\n[bold][red]The following objects were not found at the destination:[/red][/bold] " + str(self.failed_objects) |
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.
"Transfer failed. The following..."
print success msg after verify print success msg after verify print success msg after verify print success msg after verify
df81c51
to
62d31e7
Compare
Fixes #508
TransferFailedException raised by ReplicatorClient.verify_transfer_prefix() will now be caught in both cp and sync, and a detailed transfer failed message will be printed.