vorta
vorta copied to clipboard
fix repository compression size
Description
unique_csize
field was removed in commit https://github.com/borgbase/vorta/commit/f9d12603164bc663263a86abd17502198059a006 as the field was dropped in Borg V2.
This PR adds a check to only display the field in Borg V1.
Related Issue
Closes #1750
Motivation and Context
Currently the Compressed Size field displays N/A for new repos and a stale size for old repos which is never updated.
How Has This Been Tested?
- Compression size updated again on Borg V1.
- Field hidden on Borg V2.
Screenshots (if appropriate):
Types of changes
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [X] I have read the CONTRIBUTING guide.
- [X] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [X] All new and existing tests passed.
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.
Hi @henry-spanka,
Thanks for this PR! Appreciate the work. Just ran it locally and I think it needs some additional discussion:
- First, the version is set async to avoid blocking the interface. So it's not known when the repo tab is first rendered.
- Then you put the
hide()
functions intoRepoTab.__init__()
which is only run once when the version isn't known yet. To make it at least work for subsequent changes, it should go intoRepoTab.populate_from_profile()
The other checks you added while processing the data should be fine.
In your linked issue, you also suggest removing the field completely. Given the timing issue we have here, maybe that's better? Any replacement we could use instead?
Any replacement we could use instead?
Maybe we can display Compression Size: Calculating
till the version is known and then populate/hide it accordingly?
Maybe we can display
Compression Size: Calculating
till the version is known and then populate/hide it accordingly?
I like that.