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

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: Update config tests Created 4 years, 4 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
Index: milo/appengine/buildbot/builder.go
diff --git a/milo/appengine/buildbot/builder.go b/milo/appengine/buildbot/builder.go
index 332fcd34cde6f1de510e50b35b3bf47e59d3565f..db3fe7a20a01c29be1695c819c23da5ddcb1e3fb 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)
if err != nil {
return nil, fmt.Errorf("Cannot find master %s\n%s", masterName, err.Error())
}

Powered by Google App Engine
This is Rietveld 408576698