backends: have separate exceptions for invalid url and dependency missing#126
backends: have separate exceptions for invalid url and dependency missing#126ThomasWaldmann merged 11 commits intoborgbackup:masterfrom
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 |
|
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.