Skip to content

bug: VMAlertmanagerConfig validation for mute_time_interval is missing in sub-routes #1618

@johnnybee78716

Description

@johnnybee78716

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 } 

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions