vmalert-tool: exit immediately when rule group execute failed (#6509)

g.ExecOnce() shouldn't be failed at all. If it fails, it might be bug or
something wrong with tmp vm datasource, exit immediately.
This commit is contained in:
Hui Wang 2024-06-20 17:47:00 +08:00 committed by GitHub
parent d236604d39
commit fb7454a14d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -304,6 +304,7 @@ func (tg *testGroup) test(evalInterval time.Duration, groupOrderMap map[string]i
if err != nil {
checkErrs = append(checkErrs, fmt.Errorf("\nfailed to exec group: %q, time: %s, err: %w", g.Name,
ts, err))
return
}
}
// flush series after each group evaluation