Error on empty configuration sections #771

Closed
opened 2023-10-14 20:02:37 +00:00 by witten · 2 comments
Owner

Here's an issue that came in via email.

The news file says:

Remove configuration sections ("location:", "storage:", "hooks:",
etc.), while still keeping deprecated support for them.

I would expect my existing configuration to just work but empty sections
don't work anymore. For example, for the configuration below, borgmatic
will complain

At the top level: Additional properties are not allowed ('hooks',
'output' were unexpected)

Here is my configuration:

  {
    "hooks": {},
    "location": {
      "repositories": ["ssh://foo.bar"],
    },
    "output": {}
  }

Removing the empty sections make borgmatic happier.

I don't think this problem is worth changing the code but I wanted to
let you know anyway. Maybe updating the NEWS file for completeness?

Here's an issue that came in via email. The news file says: > Remove configuration sections ("location:", "storage:", "hooks:", > etc.), while still keeping deprecated support for them. I would expect my existing configuration to just work but empty sections don't work anymore. For example, for the configuration below, borgmatic will complain > At the top level: Additional properties are not allowed ('hooks', > 'output' were unexpected) Here is my configuration: ```yaml { "hooks": {}, "location": { "repositories": ["ssh://foo.bar"], }, "output": {} } ``` Removing the empty sections make borgmatic happier. I don't think this problem is worth changing the code but I wanted to let you know anyway. Maybe updating the NEWS file for completeness?
Author
Owner

Fixed in main. Will be part of the next release.

Fixed in main. Will be part of the next release.
Author
Owner

Released in borgmatic 1.8.4!

Released in borgmatic 1.8.4!
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#771
No description provided.