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

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

Issue 2275123002: Milo: pRPC endpoint for getting Buildbot master data (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Renamed stuff Created 4 years, 3 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/api/proto/pb.discovery.go ('k') | milo/appengine/buildbot/grpc.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/builder.go
diff --git a/milo/appengine/buildbot/builder.go b/milo/appengine/buildbot/builder.go
index cb33e69ff9e45dbdadc47058984618b760682377..74adcf72708a31b174c484515042ee447c13ee1a 100644
--- a/milo/appengine/buildbot/builder.go
+++ b/milo/appengine/buildbot/builder.go
@@ -7,7 +7,6 @@ package buildbot
import (
"encoding/json"
"fmt"
- "net/http"
"os"
"sort"
"strings"
@@ -18,8 +17,6 @@ import (
"github.com/luci/luci-go/common/clock"
"github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/milo/api/resp"
- "github.com/luci/luci-go/milo/appengine/settings"
- "github.com/luci/luci-go/milo/common/miloerror"
"golang.org/x/net/context"
)
@@ -114,27 +111,13 @@ func getCurrentBuilds(c context.Context, master *buildbotMaster, builderName str
return results
}
-var errMasterNotFound = miloerror.Error{
- Message: "Master not found",
- Code: http.StatusNotFound,
-}
-
// builderImpl is the implementation for getting a milo builder page from buildbot.
// This gets:
// * Current Builds from querying the master json from the datastore.
// * Recent Builds from a cron job that backfills the recent builds.
func builderImpl(c context.Context, masterName, builderName string) (*resp.Builder, error) {
result := &resp.Builder{}
- master, internal, t, err := getMasterJSON(c, masterName)
- if internal {
- allowed, err := settings.IsAllowedInternal(c)
- if err != nil {
- return nil, err
- }
- if !allowed {
- return nil, errMasterNotFound
- }
- }
+ master, t, err := getMasterJSON(c, masterName)
switch {
case err == datastore.ErrNoSuchEntity:
return nil, errMasterNotFound
« no previous file with comments | « milo/api/proto/pb.discovery.go ('k') | milo/appengine/buildbot/grpc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698