Spot check not recognised by yaml schema #904
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
Use the spot check.
Steps to reproduce
No matter what variations of values I try within the
-name: spot
block, config will not validate. Removing that block/line, the schema validates successfully.Actual behavior
Output of
borgmatic config validate
:Expected behavior
Spot check should be a valid name per config reference of current version.
Other notes / implementation ideas
No response
borgmatic version
1.8.13
borgmatic installation method
container: modem7/borgmatic-docker
Borg version
1.4.0
Python version
3.12.4
Database version (if applicable)
No response
Operating system and version
No response
Thanks for the detailed ticket! The problem is that the other
spot
options are required (count_tolerance_percentage
,data_sample_percentage
, anddata_tolerance_percentage
), and so the configuration validation isn't recognizing thespot
check without them. That leads to the error you're seeing. See the documentation for an example and more details.I'd love to make this situation have a better error message, but for some pretty esoteric compatibility reasons, I don't have a good way to do that right now.
Ah, I see. I know its a very new feature, but my recommendation is to mention this in the configuration reference - its pretty much my go to for documentation for borgmatic. I also generally expect config references to mention if values are required, and assume they're optional/have a default value unless otherwise stated.
Good idea! Where would it have been most helpful in the configuration reference? In the comment about the
name
option or in the comments for the individualspot
-specific options?There is validity in both to me. Looking at it currently, the description for "name" value is a bit wordy and hard to parse at a glance, so if included there I'd break the explanations of each action up with some line breaks or indentation. Otherwise, I'd include it with the values - they already mention that the values are only relevant for spot, you can simply slip and extra word or two in there.
Understood. Thank you!
Done. These clarifications should show up on the website shortly. Thanks again!