Skip to content
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

fix repository compression size #1751

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

henry-spanka
Copy link
Contributor

@henry-spanka henry-spanka commented Jul 12, 2023

Description

unique_csize field was removed in commit f9d1260 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

  • 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:

  • I have read the CONTRIBUTING guide.
  • 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.
  • 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.

@m3nu
Copy link
Contributor

m3nu commented Jul 24, 2023

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 into RepoTab.__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 into RepoTab.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?

@m3nu m3nu marked this pull request as draft January 9, 2024 08:07
@shivansh02
Copy link
Collaborator

Any replacement we could use instead?

Maybe we can display Compression Size: Calculating till the version is known and then populate/hide it accordingly?

@real-yfprojects
Copy link
Collaborator

Maybe we can display Compression Size: Calculating till the version is known and then populate/hide it accordingly?

I like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removal of compression field causes stale size being displayed in UI
4 participants