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

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

Issue 2748073006: Milo Refactor: Remove theme support (Closed)
Patch Set: Fix builder.html pointer 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
Index: milo/appengine/buildbot/builder.go
diff --git a/milo/appengine/buildbot/builder.go b/milo/appengine/buildbot/builder.go
index b4fdaf45304823cd69e580635713612916644c2c..6a9cd265fdad82c6a6a0727b1d372fb67d607434 100644
--- a/milo/appengine/buildbot/builder.go
+++ b/milo/appengine/buildbot/builder.go
@@ -5,18 +5,17 @@
package buildbot
import (
+ "errors"
"fmt"
- "net/http"
"sort"
"strings"
"time"
- ds "github.com/luci/gae/service/datastore"
+ "github.com/luci/gae/service/datastore"
"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/common/miloerror"
"golang.org/x/net/context"
)
@@ -91,7 +90,7 @@ func getBuilds(
// TODO(hinoka): Builder specific structs.
result := []*resp.BuildSummary{}
- q := ds.NewQuery("buildbotBuild")
+ q := datastore.NewQuery("buildbotBuild")
q = q.Eq("finished", finished)
q = q.Eq("master", masterName)
q = q.Eq("builder", builderName)
@@ -110,15 +109,9 @@ func getBuilds(
return result, nil
}
-var errMasterNotFound = miloerror.Error{
- Message: "Either the request resource was not found or you are not authorized",
- Code: http.StatusNotFound,
-}
-
-var errNotAuth = miloerror.Error{
- Message: "You are not authenticated, try logging in",
- Code: http.StatusUnauthorized,
-}
+var errMasterNotFound = errors.New(
+ "Either the request resource was not found or you have insufficient permissions")
+var errNotAuth = errors.New("You are not authenticated, try logging in")
// builderImpl is the implementation for getting a milo builder page from buildbot.
// This gets:

Powered by Google App Engine
This is Rietveld 408576698