feat: remove compact button for older borg versions < 1.2#1727
Conversation
Hofer-Julian
left a comment
There was a problem hiding this comment.
I've tested the branch locally and it works as expected.
From my side, this PR is ready to be merged.
Sidenote: I found it surprisingly hard to install an older version of borgbackup locally.
I see that #1716 used nox, but I guess that doesn't help outside of test environments?
No, I don't think so. It uses |
| if not borg_compat.check('COMPACT_SUBCOMMAND'): | ||
| ret['ok'] = False | ||
| ret['message'] = trans_late('messages', 'This feature needs Borg 1.2.0 or higher.') | ||
| return ret | ||
|
|
There was a problem hiding this comment.
Instead of removing this you could raise an Exception 🤷
There was a problem hiding this comment.
Right. In case the code is somehow run with the wrong version. But how would that work if the same check already runs elsewhere? Who knows..
There was a problem hiding this comment.
Hmm, even I thought it might be redundant but ig good to have it.
…ithub.com/diivi/vorta into feat/remove-compact-button-for-older-borg
|
Tested locally and the button state becomes enabled again after changing the profile. |
…ithub.com/diivi/vorta into feat/remove-compact-button-for-older-borg
m3nu
left a comment
There was a problem hiding this comment.
Tested locally and was working.
|
Another one in the bag. 👍 |

Description
This PR removes the check for Borg version in compact.py and hides the compact button in archive_tab.py if the Borg version is less than 1.2.0. This is done to prevent errors and crashes caused by using the compact feature with an incompatible Borg version.
Related Issue
Related to:
#1723
Motivation and Context
Hides the compact button from the user instead of misleading them into thinking compact will work.
How Has This Been Tested?
Tested manually with Borg 1.2.0
Screenshots (if appropriate):
After manually changing the minimum reqd version to 1.5.0 just to test:

Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.