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

Unified Diff: milo/appengine/buildinfo/service.go

Issue 2667363002: milo: Add a build info Swarming implementation. (Closed)
Patch Set: Comments. Created 3 years, 10 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 | milo/appengine/swarming/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildinfo/service.go
diff --git a/milo/appengine/buildinfo/service.go b/milo/appengine/buildinfo/service.go
index ed63afe2830f06d0fce6151fea44abe262d132f0..04bd147a49affa6e8ae0f5152ae25f94c3988a61 100644
--- a/milo/appengine/buildinfo/service.go
+++ b/milo/appengine/buildinfo/service.go
@@ -9,6 +9,7 @@ import (
"github.com/luci/luci-go/luci_config/common/cfgtypes"
milo "github.com/luci/luci-go/milo/api/proto"
"github.com/luci/luci-go/milo/appengine/buildbot"
+ "github.com/luci/luci-go/milo/appengine/swarming"
"google.golang.org/grpc/codes"
@@ -19,6 +20,8 @@ import (
type Service struct {
// BuildBot is the BuildInfoProvider for the BuildBot service.
BuildBot buildbot.BuildInfoProvider
+ // Swarming is the BuildInfoProvider for the Swarming service.
+ Swarming swarming.BuildInfoProvider
}
var _ milo.BuildInfoServer = (*Service)(nil)
@@ -41,7 +44,11 @@ func (svc *Service) Get(c context.Context, req *milo.BuildInfoRequest) (*milo.Bu
return resp, nil
case req.GetSwarming() != nil:
- return nil, grpcutil.Unimplemented
+ resp, err := svc.Swarming.GetBuildInfo(c, req.GetSwarming(), projectHint)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
default:
return nil, grpcutil.Errf(codes.InvalidArgument, "must supply a build")
« no previous file with comments | « no previous file | milo/appengine/swarming/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698