fix(releaseupdate): canary ignores task alerts, which the park rate already judges
This commit is contained in:
1 file changed
+5
-1
@@ -88,6 +88,7 @@ func (d CanaryDashboard) ready(ctx context.Context) (bool, error) {
|
||||
func (d CanaryDashboard) actionAlerts(ctx context.Context, since time.Time) ([]string, error) {
|
||||
var body struct {
|
||||
Alerts []struct {
|
||||
Kind string `json:"kind"`
|
||||
Severity string `json:"severity"`
|
||||
Title string `json:"title"`
|
||||
FirstRaised time.Time `json:"first_raised"`
|
||||
@@ -98,7 +99,10 @@ func (d CanaryDashboard) actionAlerts(ctx context.Context, since time.Time) ([]s
|
||||
}
|
||||
var titles []string
|
||||
for _, a := range body.Alerts {
|
||||
if a.Severity == "action" && !a.FirstRaised.Before(since) {
|
||||
// A task needing a decision is the task's outcome, which the park
|
||||
// rate already judges against the baseline; counting each one as a
|
||||
// hard failure rolls back every release on a busy host.
|
||||
if a.Severity == "action" && !strings.HasPrefix(a.Kind, "task.") && !a.FirstRaised.Before(since) {
|
||||
titles = append(titles, a.Title)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user