config: detect duplicate & internal job names at parse time

Before this PR, config parsing would accept duplicate job names.
`zrepl daemon` would later fail to start with a panic.
But tools like `zrepl configcheck` would pass.

This PR adds a check to ensure job names are unique.

Similarly, internal job names were not being rejected by config
parsing
Move that check to parse-time as well.
This commit is contained in:
Christian Schwarz
2026-01-19 08:20:07 +00:00
parent 4d6583ea5f
commit 8153d399f0
9 changed files with 108 additions and 54 deletions
@@ -0,0 +1,24 @@
jobs:
- type: snap
name: "my_job"
filesystems: {
"<": true,
}
snapshotting:
type: manual
pruning:
keep:
- type: last_n
count: 10
- type: snap
name: "my_job"
filesystems: {
"<": true,
}
snapshotting:
type: manual
pruning:
keep:
- type: last_n
count: 5