CONFIG_PATHS no longer accepts multiple values #919
Loadingโฆ
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
What I'm trying to do and why
I upgraded from borgmatic 1.7.13 to 1.8.14, and now this command with two configs no longer works:
Steps to reproduce
Try the following in borgmatic 1.7.13 and 1.8.14 (should not matter if the config files even exist, though I verified mine are valid by running them individually):
borgmatic -c server.yaml critical.yaml -v 2
Actual behavior
Expected behavior
The command to run successfully as it did in
1.7.13
.Other notes / implementation ideas
The latest
--help
for the-c
flag example seems to be the same in both versions I tested (still space separated):I think I've identified the root cause.
In 1.7.13
--config
hadnargs='*'
: https://projects.torsion.org/borgmatic-collective/borgmatic/src/tag/1.7.13/borgmatic/commands/arguments.py#L131But at some point
nargs
was removed:I verified that treating this as a per
action=append
withoutnargs
works in 1.8.14:If this is an intentional change, then please update the documentation example with something like:
'-c '.join(default_config_paths)
:and consider restoring the original
nargs
since this is such a central argument to the command so removing it will likely cause quite a bit of noise when backup scripts unexpectedly need to be updated for a minor version change.(Minor rant: I argue that apps with semantic versioning should avoid breaking changes outside of major version bumps, e.g. v1 -> v2 can break but not v1.1 -> v1.2. I know not all apps follow this, but at least in the Python-verse my understanding is minor versions are usually backwards-compatible, which makes me wonder if this change wasn't meant to be released in v1: https://packaging.python.org/en/latest/discussions/versioning/#semantic-versioning)
borgmatic version
1.8.14
borgmatic installation method
pip install borgmatic
Borg version
1.2.1
Python version
3.10.12
Database version (if applicable)
n/a
Operating system and version
Ubuntu 22.04.4 server
Thanks for taking the time to file this and track down the cause! This is indeed an intentional change. Here's the changelog from 1.8.0 that describes it:
What I can do though is go ahead and update the command-line documentation as per your suggestion. I think that better clarifies the change.
To your point about breaking changes, borgmatic does not follow traditional semantic versioning because: 1. It would lead to version number bloat, and 2. It's too restrictive. However, it's not a total wild west; here is how borgmatic versioning generally works:
I should probably publish that "policy" somewhere...
Implemented the suggested documentation fix in main. Thank you!
Versioning policy published! https://torsion.org/borgmatic/docs/how-to/upgrade/#versioning-and-breaking-changes
Thanks so much! Even when I disagree with you, you are always a pleasure to work with. ๐
Hah, that's the best I can hope for. Thank you!
Released in borgmatic 1.9.0!