- Notifications
You must be signed in to change notification settings - Fork 190
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The nested routes with undefined "mute_time_intervals" would not trigger validation errors, while nested routes with undefined "active_time_intervals" would correctly trigger errors.
subRoute=# is not valid: undefined time interval "xxx" used in route
The root cause seems to be at the checkRouteReceiver function (vmalertmanagerconfig_types.go) only validates ActiveTimeIntervals but not MuteTimeIntervals for nested routes.
func checkRouteReceiver(r *SubRoute, receivers map[string]struct{}, tiNames map[string]struct{}) error { for _, ti := range r.ActiveTimeIntervals { if _, ok := tiNames[ti]; !ok { return fmt.Errorf("undefined time interval %q used in route", ti) } } // Here's missing check for MuteTimeIntervals // ... rest of function } f41gh7
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working