From cec08083c3a6b19805a1e8d03acd41795f164e79 Mon Sep 17 00:00:00 2001 From: Mathieu Corbin Date: Fri, 5 Apr 2024 16:34:04 +0200 Subject: [PATCH] Log rules errors as error Signed-off-by: Mathieu Corbin --- pkg/ruler/ruler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ruler/ruler.go b/pkg/ruler/ruler.go index 6a5075d..9757257 100644 --- a/pkg/ruler/ruler.go +++ b/pkg/ruler/ruler.go @@ -47,6 +47,9 @@ func (r *Ruler) Execute(ctx context.Context, ruleName string, project project.Pr } } if len(errorMessages) > 0 { + for _, errorMessage := range errorMessages { + r.logger.Error(fmt.Sprintf("error on rule %s for project %s: %s", ruleName, project.Name, errorMessage)) + } return aggregates.RuleResult{ Success: false, RuleName: ruleName,