-
Notifications
You must be signed in to change notification settings - Fork 7
backends: have separate exceptions for invalid url and dependency missing #126
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
Conversation
…stalled. Also add boto3 to dev dependencies
|
Well, it says "or unsupported", so the error msg is correct. But I agree, it would be more helpful to differentiate these 2 cases for all backends that need an extra dependency. |
|
I think the algorithm in
Extras see there: https://github.com/borgbackup/borgstore/blob/master/pyproject.toml#L29 Note: doing it that way makes it impossible to have multiple separate backend implementations for the same scheme, but with different extra requirements. but I guess we can live with that. |
|
@f-froehlich Can you please update all the backends to solve the problem completely? |
|
I updated the PR accordingly and add install instruction to the Error message in S3&SFTP urls. Other backends do not have requirements. So this should be fine now? |
|
The rclone backend does not have a python library requirement, but it requires the rclone executable in a specific minimum version, so that could be handled in the same way. |
The rclone backend has currently this check in place: Should I update the BackendDoesNotExist to DependencyMissing? The Check seems fine for me |
|
I think it would be easier (== not require changes in borg) to change DependencyMissing to BackendDoesNotExist. |
|
And the checks in rclone backend must be in same order / style as in sftp/s3. |
DependencyMissing --> BackendDoesNotExist
Done |
Done |
ThomasWaldmann
left a comment
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! |
Currently if boto3 is not installed no repository is found. So an error like
Error: Invalid or unsupported Backend Storage URL: s3:ACCESS_KEY:SECRET@https://URL/REPO/PATHis thrown. This is a bit confusing because the URL is valid but boto3 is not installed. We will now throw DependencyMissing with a proper message if using s3/b2 URL but boto3 is not installed.