check_last parameter data type validation #33
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#33
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Preconditions
Versions:
Convert an existing config file (from v1.0) with
upgrade-borgmatic-config
that has thecheck_last
configuration option defined.Example:
Is converted to
Steps to Reproduce
borgmatic -v 2 -c /etc/borgmatic/config.yaml
Result
The number was converted to a string and the validation complains that an int is expected.
However, when I change the value from
check_last: '2'
tocheck_last: 2
, this error is thrown by borgmatic when runningborgmatic -v 2 -c /etc/borgmatic/config.yaml
again:So it appears the string value is the expected one and the config file validation is wrong.
The backup functionality is not impacted, only the consistency checks (thus setting the severity to 'Important'.
Additional note:
generate-borgmatic-config
also generates a config file with an int:Imported from Taiga issue 32 (done). Created on 2017-07-24T11:00:02+0000 by Simon Dellenbach.
Thanks for reporting! I've fixed the portion that upgrades the config incorrectly. However, I'll still need to fix the other problem you found: We need to convert everything to strings before passing values to subprocess and Borg.
Comment on 2017-07-24T15:45:52+0000 by Dan Helfman.
Okay, this should be fixed now in borgmatic 1.1.2 (just released). Thanks again for reporting it with such detail about the repro case.
Comment on 2017-07-25T02:32:14+0000 by Dan Helfman.
Yes, it works fine again in 1.1.2. I've also re-run the upgrade of my old config file and verified that the value is correct.
Thank you very much for the quick fix!
Comment on 2017-07-25T15:48:43+0000 by Simon Dellenbach.