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

Unified Diff: monitoring/go/datahopper/main.go

Issue 796883002: buildbot package: actually find commits for each build during ingestion (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Pretty format the JSON Created 6 years 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 | « go/buildbot/testdata/venue466.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: monitoring/go/datahopper/main.go
diff --git a/monitoring/go/datahopper/main.go b/monitoring/go/datahopper/main.go
index 3fa65f984ecb27794fe8849cbbfda74126df0387..e301f790fe80ce002fe009ba910566a28edcd4f5 100644
--- a/monitoring/go/datahopper/main.go
+++ b/monitoring/go/datahopper/main.go
@@ -6,12 +6,14 @@ package main
import (
"flag"
+ "path"
"time"
"github.com/golang/glog"
influxdb "github.com/influxdb/influxdb/client"
"skia.googlesource.com/buildbot.git/go/buildbot"
"skia.googlesource.com/buildbot.git/go/common"
+ "skia.googlesource.com/buildbot.git/go/gitinfo"
"skia.googlesource.com/buildbot.git/go/metadata"
"skia.googlesource.com/buildbot.git/monitoring/go/autoroll_ingest"
)
@@ -19,6 +21,7 @@ import (
const (
INFLUXDB_NAME_METADATA_KEY = "influxdb_name"
INFLUXDB_PASSWORD_METADATA_KEY = "influxdb_password"
+ SKIA_REPO = "https://skia.googlesource.com/skia"
)
// flags
@@ -61,10 +64,15 @@ func main() {
if err := buildbot.InitDB(buildbot.ProdDatabaseConfig(*testing)); err != nil {
glog.Fatal(err)
}
-
+ // Create the Git repo.
+ skiaRepo, err := gitinfo.CloneOrUpdate(SKIA_REPO, path.Join(*workdir, "buildbot_git", "skia"), true)
+ if err != nil {
+ glog.Fatal(err)
+ }
// Ingest data in a loop.
for _ = range time.Tick(30 * time.Second) {
- if err := buildbot.IngestNewBuilds(); err != nil {
+ skiaRepo.Update(true, true)
+ if err := buildbot.IngestNewBuilds(skiaRepo); err != nil {
glog.Errorf("Failed to ingest new builds: %v", err)
}
}
« no previous file with comments | « go/buildbot/testdata/venue466.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698