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

Unified Diff: milo/appengine/buildbucket/html.go

Issue 2765383002: Milo: Move instance configuration to luci-config (Closed)
Patch Set: Review 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/buildbucket/builder_test.go ('k') | 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/buildbucket/html.go
diff --git a/milo/appengine/buildbucket/html.go b/milo/appengine/buildbucket/html.go
index cf074c5b92ab1da1ff8df8ff53dfc391da8bf232..38fbf9268eb16dd3b1e163da826ff4170e320ba1 100644
--- a/milo/appengine/buildbucket/html.go
+++ b/milo/appengine/buildbucket/html.go
@@ -5,6 +5,7 @@
package buildbucket
import (
+ "context"
"errors"
"net/http"
@@ -14,14 +15,8 @@ import (
"github.com/luci/luci-go/server/templates"
)
-// TODO(nodir): move this value to luci-config.
-const defaultServer = "cr-buildbucket.appspot.com"
-
-func parseBuilderQuery(r *http.Request, p httprouter.Params) (query builderQuery, err error) {
- query.Server = r.FormValue("server")
- if query.Server == "" {
- query.Server = defaultServer
- }
+func parseBuilderQuery(c context.Context, r *http.Request, p httprouter.Params) (
+ query builderQuery, err error) {
query.Bucket = p.ByName("bucket")
if query.Bucket == "" {
@@ -45,7 +40,7 @@ func parseBuilderQuery(r *http.Request, p httprouter.Params) (query builderQuery
// Note: The builder html template contains self links to "?limit=123", which could
// potentially override any other request parameters set.
func BuilderHandler(c *router.Context) {
- query, err := parseBuilderQuery(c.Request, c.Params)
+ query, err := parseBuilderQuery(c.Context, c.Request, c.Params)
if err != nil {
common.ErrorPage(c, http.StatusBadRequest, err.Error())
return
« no previous file with comments | « milo/appengine/buildbucket/builder_test.go ('k') | milo/appengine/swarming/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698