jsonschema 3.2.0 traceback with 1.5.16 when including the umask stanza in the hooks section #437
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#437
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?
What I'm trying to do and why
Trying to set
umask
to0027
when runningbefore_backup
hook scripts.Steps to reproduce (if a bug)
Actual behavior (if a bug)
jsonschema complains with
jsonschema.exceptions.UndefinedTypeCheck: Type 'scalar' is unknown to this type checker
(see full traceback below). Using the latest stable jsonschema 3.2.0 under Python 3.6.9.This seems to be caused by borgmatic/config/schema.yaml line 790, where
umask
is defined astype: scalar
which isn't known to jsonschema.Full traceback:
Expected behavior (if a bug)
No crash.
Other notes / implementation ideas
Can be worked around by setting the umask in the hook scripts and removing that stanza from the borgmatic config YAML, of course.
Environment
borgmatic version: 1.5.16
borgmatic installation method: Debian package (self-packaged as before, based on and backported from the upstream sid package)
Borg version: 1.1.15
Python version: 3.6.9
operating system and version: Ubuntu 18.04 LTS
Ugh, good catch! Thank you so much for taking the time to file this.
Fix is in master. You can use it to modify your schema manually if you need an immediate fix. About to do a bug fix release for this as well.
Okay, the fix is released in borgmatic 1.5.17. Thanks again!