From a69a8b931fcf22a70e9a7d1cf6c2d7e0782306da Mon Sep 17 00:00:00 2001 From: johncming Date: Fri, 17 Jul 2020 15:39:15 +0800 Subject: [PATCH] rules: fix bug for unknown alert state. (#7599) Signed-off-by: johncming --- rules/alerting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/alerting.go b/rules/alerting.go index 54ee31d74..c82bc9640 100644 --- a/rules/alerting.go +++ b/rules/alerting.go @@ -74,7 +74,7 @@ func (s AlertState) String() string { case StateFiring: return "firing" } - panic(errors.Errorf("unknown alert state: %s", s.String())) + panic(errors.Errorf("unknown alert state: %d", s)) } // Alert is the user-level representation of a single instance of an alerting rule.