snapscheduler
snapscheduler copied to clipboard
Retention regular expression should be less strict
Describe the bug I am generating valid Go durations with Go, and they are rejected by the strict regular expression.
https://go.dev/play/p/ErDekq0050M
fmt.Println(24 * 365 * time.Hour)
// 8760h0m0s
Steps to reproduce
Generate a valid time.Duration string, and then try to use it in retention.expires.
Expected behavior
The valid duration should not be rejected.
Actual results
Error from server (Invalid): SnapshotSchedule.snapscheduler.backube "immich-server-monthly" is invalid: spec.retention.expires: Invalid value: "8760h0m0s": spec.retention.expires in body should match '^\d+(h|m|s)$'
Additional context