Added debug message that logs borg version for every config #792
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch ":main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@witten are you not interested in merging this yet or did you not get around to look at it?
Did not get around to looking yet, sorry! I'm kind of underwater on borgmatic stuff at the moment. Barely managed to squeeze out a release. I'll have a look at this hopefully this week.
@ -77,1 +77,4 @@
local_borg_version = borg_version.local_borg_version(config, local_path)
yield from log_error_records(
f'{config_filename}: Local Borg version: {local_borg_version}', levelno=logging.DEBUG
)
This should probably just be a
logger.debug()
orlogger.info()
call since it's not an error...? Unfortunately though such a change would obsolete some of your laborious test work. But the good news is it might actually make your test changes easier to mock.Let me know your thoughts.
Yes that does indeed make a lot of sense and explains why the unit tests were such a pain.
Fixed now
a20e1e95d8
to8b9abc6cf8
Another question that's still up for debate is when to log all the versions. In the old pull request I did it in
run_configuration()
but that implies that we log everything multiple times since (I assume) for multiple configs this gets called for each one. Since the python version, borgmatic version and os should never change between config files it would probably be better to log them closer to startup than that so they only get logged once instead.Yes, that makes sense to me! I think it's fine if not everything is logged in the exact same place—some globally and some per-config as appropriate.
Looks good! I think it does make sense to log this here because it could vary between configuration files if the local path option varies. But I'd recommend capitalizing Borg here because convention.
What convention? borg is normally always written as
borg
notBorg
, at least I have never seen it written that way anywhere?The convention at least in borgmatic documentation and error messages is to call it "Borg" (as per the Borg docs). borgmatic, on the other hand, is always lowercase!
Fixed now
Thank you! Did you want me to merge just this change or did you want to do the rest of the ticket in this PR?
Just this
I will do all the information separately later and I think there is a lot of room for discussion on how and were to implement the rest.
Sounds good!