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

Unified Diff: milo/appengine/buildbot/grpc.go

Issue 2774343003: Promote LogDog aliases for BuildBot JSON data. (Closed)
Patch Set: comments Created 3 years, 9 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 | « milo/appengine/buildbot/build.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/grpc.go
diff --git a/milo/appengine/buildbot/grpc.go b/milo/appengine/buildbot/grpc.go
index 00c7c6e4c2bd266dc900b9427d14bbee6a141ea9..bb7fcb164b47b4d3a2514704feb2ee2d211d63a1 100644
--- a/milo/appengine/buildbot/grpc.go
+++ b/milo/appengine/buildbot/grpc.go
@@ -9,6 +9,7 @@ import (
"compress/gzip"
"encoding/json"
+ "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
@@ -18,7 +19,6 @@ import (
"github.com/luci/luci-go/common/logging"
milo "github.com/luci/luci-go/milo/api/proto"
"github.com/luci/luci-go/server/auth"
- "golang.org/x/net/context"
)
// Service is a service implementation that displays BuildBot builds.
@@ -27,8 +27,7 @@ type Service struct{}
var errNotFoundGRPC = grpc.Errorf(codes.NotFound, "Master Not Found")
// GetBuildbotBuildJSON implements milo.BuildbotServer.
-func (s *Service) GetBuildbotBuildJSON(
- c context.Context, req *milo.BuildbotBuildRequest) (
+func (s *Service) GetBuildbotBuildJSON(c context.Context, req *milo.BuildbotBuildRequest) (
*milo.BuildbotBuildJSON, error) {
if req.Master == "" {
@@ -52,6 +51,7 @@ func (s *Service) GetBuildbotBuildJSON(
return nil, err
}
+ updatePostProcessBuild(b)
bs, err := json.Marshal(b)
if err != nil {
return nil, err
@@ -62,8 +62,7 @@ func (s *Service) GetBuildbotBuildJSON(
}
// GetBuildbotBuildsJSON implements milo.BuildbotServer.
-func (s *Service) GetBuildbotBuildsJSON(
- c context.Context, req *milo.BuildbotBuildsRequest) (
+func (s *Service) GetBuildbotBuildsJSON(c context.Context, req *milo.BuildbotBuildsRequest) (
*milo.BuildbotBuildsJSON, error) {
if req.Master == "" {
@@ -109,6 +108,8 @@ func (s *Service) GetBuildbotBuildsJSON(
results := make([]*milo.BuildbotBuildJSON, len(builds))
for i, b := range builds {
+ updatePostProcessBuild(b)
+
// In theory we could do this in parallel, but it doesn't actually go faster
// since AppEngine is single-cored.
bs, err := json.Marshal(b)
@@ -124,8 +125,8 @@ func (s *Service) GetBuildbotBuildsJSON(
// GetCompressedMasterJSON assembles a CompressedMasterJSON object from the
// provided MasterRequest.
-func (s *Service) GetCompressedMasterJSON(
- c context.Context, req *milo.MasterRequest) (*milo.CompressedMasterJSON, error) {
+func (s *Service) GetCompressedMasterJSON(c context.Context, req *milo.MasterRequest) (
+ *milo.CompressedMasterJSON, error) {
if req.Name == "" {
return nil, grpc.Errorf(codes.InvalidArgument, "No master specified")
@@ -169,6 +170,10 @@ func (s *Service) GetCompressedMasterJSON(
master.Name, slave.Runningbuilds)
return nil, err
}
+
+ for _, b := range slave.Runningbuilds {
+ updatePostProcessBuild(b)
+ }
}
// Also inject cached builds information.
« no previous file with comments | « milo/appengine/buildbot/build.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698