snapscheduler icon indicating copy to clipboard operation
snapscheduler copied to clipboard

Retention regular expression should be less strict

Open uhthomas opened this issue 5 months ago • 1 comments

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

uhthomas avatar Jul 24 '25 15:07 uhthomas