-
Notifications
You must be signed in to change notification settings - Fork 141
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
add option to refresh individual archives #878
Conversation
Codecov Report
@@ Coverage Diff @@
## master #878 +/- ##
==========================================
- Coverage 73.36% 72.58% -0.78%
==========================================
Files 55 56 +1
Lines 3720 3775 +55
==========================================
+ Hits 2729 2740 +11
- Misses 991 1035 +44
Continue to review full report at Codecov.
|
Minor comment on renaming the file and class. Rest looks great. Thanks for the useful addition! |
@m3nu, what are you suggesting I rename the file and class to? |
not sure why checks timed-out. I reran the action in my fork and it completed, but can't figure out how to get it to re-run in the PR unless I push a dummy change. |
ff2e76a
to
6d3bb42
Compare
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.
not sure why checks timed-out. I reran the action in my fork and it completed, but can't figure out how to get it to re-run in the PR unless I push a dummy change.
Some macOS checks can hang after the tests were successful. I'm not sure about the reason, but addressed a few possible reasons in #877. Could be the combo of pytest + coverage when using threads.
src/vorta/borg/refresh_archive.py
Outdated
from vorta.models import ArchiveModel | ||
|
||
|
||
class BorgRefreshArchiveThread(BorgThread): |
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.
We already have a borg.info.py
, which runs the same command, but on a whole repo.
So how about calling this one borg.info_archive.py
to follow the convention of borg.list_repo/archive.py
src/vorta/borg/refresh_archive.py
Outdated
archive = ArchiveModel.get_or_none( | ||
snapshot_id=remote_archive['id'], | ||
repo=repo_id) | ||
archive.name = remote_archive['name'] # incase name changed |
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.
This fails, if we get none
above. Probably not likely, since the command takes the archive name just seconds earlier.
Usually we name our commands after the Borg subcommand used. In
So the consistent choice would be to rename |
The renaming is mostly logistics. I really like this PR because it only changes what's necessary and is easy to understand. If you prefer, I can do the renaming before merging. |
…ation, and name. (discussion borgbase#828)
- possible solution to issue borgbase#338
7fe3905
to
2f35df1
Compare
Is it OK if I finish the renaming and then just merge? |
sure |
Thanks for the contribution. Merged. |
allow individual archives to do a more complete refresh, pulling in/updating size and duration. (see discussion #828)