Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1533)

Unified Diff: alertserver/go/alertserver/alertroutines.go

Issue 1171823005: Add autoroll package, alerts for failed rolls, recent rolls on Status (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Address comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | go/autoroll/autoroll.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: alertserver/go/alertserver/alertroutines.go
diff --git a/alertserver/go/alertserver/alertroutines.go b/alertserver/go/alertserver/alertroutines.go
index d512c3303c2293230c4d2328397f804507545696..42ec9ddace7d60d2b77af318b9acb009b6d29503 100644
--- a/alertserver/go/alertserver/alertroutines.go
+++ b/alertserver/go/alertserver/alertroutines.go
@@ -10,6 +10,7 @@ import (
"github.com/skia-dev/glog"
"github.com/skia-dev/influxdb/client"
"go.skia.org/infra/alertserver/go/alerting"
+ "go.skia.org/infra/go/autoroll"
"go.skia.org/infra/go/buildbot"
"go.skia.org/infra/go/util"
)
@@ -191,4 +192,30 @@ func StartAlertRoutines(am *alerting.AlertManager, tickInterval time.Duration, c
}
}
}()
+
+ // AutoRoll failure.
+ go func() {
+ lastSearch := time.Now()
+ for now := range time.Tick(time.Minute) {
+ glog.Infof("Searching for DEPS rolls.")
+ results, err := autoroll.GetRecentRolls(lastSearch)
+ if err != nil {
+ glog.Errorf("Failed to search for DEPS rolls: %v", err)
+ continue
+ }
+ lastSearch = now
+ for _, issue := range results {
+ if issue.Closed && !issue.Committed {
+ if err := am.AddAlert(&alerting.Alert{
+ Name: "AutoRoll Failed",
+ Message: fmt.Sprintf("DEPS roll failed: %s/%d", autoroll.RIETVELD_URL, issue.Issue),
+ Nag: int64(3 * time.Hour),
+ Actions: actions,
+ }); err != nil {
+ glog.Error(err)
+ }
+ }
+ }
+ }
+ }()
}
« no previous file with comments | « no previous file | go/autoroll/autoroll.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698