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

Unified Diff: milo/appengine/buildbucket/builder.go

Issue 2929703002: [api] Regenerate remote APIs. (Closed)
Patch Set: fix Created 3 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 | « common/api/swarming/swarming/v1/swarming-api.json ('k') | milo/appengine/buildbucket/common.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbucket/builder.go
diff --git a/milo/appengine/buildbucket/builder.go b/milo/appengine/buildbucket/builder.go
index 4062a4e88299b2e4c15bd21ae77b00f1a265bea1..30a3b9b510084541609e57c616e6095675439e75 100644
--- a/milo/appengine/buildbucket/builder.go
+++ b/milo/appengine/buildbucket/builder.go
@@ -56,7 +56,7 @@ func search(c context.Context, client *buildbucket.Service, req *buildbucket.Sea
// The returned builds are sorted by build creation descending.
// count defines maximum number of builds to fetch; if <0, defaults to 100.
func fetchBuilds(c context.Context, client *buildbucket.Service, bucket, builder,
- status string, count int) ([]*buildbucket.ApiBuildMessage, error) {
+ status string, count int) ([]*buildbucket.ApiCommonBuildMessage, error) {
req := client.Search()
req.Bucket(bucket)
@@ -67,7 +67,7 @@ func fetchBuilds(c context.Context, client *buildbucket.Service, bucket, builder
count = 100
}
- fetched := make([]*buildbucket.ApiBuildMessage, 0, count)
+ fetched := make([]*buildbucket.ApiCommonBuildMessage, 0, count)
start := clock.Now(c)
for len(fetched) < count {
req.MaxBuilds(int64(count - len(fetched)))
@@ -94,7 +94,7 @@ func fetchBuilds(c context.Context, client *buildbucket.Service, bucket, builder
// toMiloBuild converts a buildbucket build to a milo build.
// In case of an error, returns a build with a description of the error
// and logs the error.
-func toMiloBuild(c context.Context, build *buildbucket.ApiBuildMessage) *resp.BuildSummary {
+func toMiloBuild(c context.Context, build *buildbucket.ApiCommonBuildMessage) *resp.BuildSummary {
// Parsing of parameters and result details is best effort.
var params buildParameters
if err := json.NewDecoder(strings.NewReader(build.ParametersJson)).Decode(&params); err != nil {
« no previous file with comments | « common/api/swarming/swarming/v1/swarming-api.json ('k') | milo/appengine/buildbucket/common.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698