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

Unified Diff: milo/appengine/common/middleware.go

Issue 2937693003: Make luci-go compile again after deps.lock roll. (Closed)
Patch Set: Created 3 years, 6 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 | « grpc/cmd/cproto/testdata/twoFiles/2.pb.golden ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/common/middleware.go
diff --git a/milo/appengine/common/middleware.go b/milo/appengine/common/middleware.go
index c54d2b3ac71608cab9a9477bbc06907cae762afd..5066faf82782aeb74c2a6c3dc1a393eb80c19a9c 100644
--- a/milo/appengine/common/middleware.go
+++ b/milo/appengine/common/middleware.go
@@ -15,8 +15,6 @@ import (
"github.com/luci/luci-go/appengine/gaeauth/server"
"github.com/luci/luci-go/appengine/gaemiddleware"
"github.com/luci/luci-go/common/clock"
- "github.com/luci/luci-go/common/cloudlogging"
- "github.com/luci/luci-go/common/logging/cloudlog"
"github.com/luci/luci-go/server/analytics"
"github.com/luci/luci-go/server/auth"
"github.com/luci/luci-go/server/auth/identity"
@@ -73,30 +71,11 @@ func Base(templatePath string) router.MiddlewareChain {
// FlexBase returns the basic middleware for use on appengine flex. Flex does not
// allow the use of appengine APIs.
func FlexBase() router.MiddlewareChain {
- // Use the cloud logger.
- logger := func(c *router.Context, next router.Handler) {
- project := info.AppID(c.Context)
- logClient, err := cloudlogging.NewClient(
- cloudlogging.ClientOptions{
- ProjectID: project,
- LogID: "gae_app",
- ResourceType: "gae_app",
- },
- // TODO(hinoka): This may require authentication to actually work.
- http.DefaultClient)
- if err != nil {
- panic(err)
- }
- c.Context = cloudlog.Use(c.Context, cloudlog.Config{}, logClient)
- next(c)
- }
// Installs the Info and Datastore services.
- base := func(c *router.Context, next router.Handler) {
+ return router.NewMiddlewareChain(func(c *router.Context, next router.Handler) {
c.Context = cloud.UseFlex(c.Context)
next(c)
- }
- // Now chain it all together!
- return router.NewMiddlewareChain(base, logger)
+ })
}
// The context key, so that we can embed the http.Request object into
« no previous file with comments | « grpc/cmd/cproto/testdata/twoFiles/2.pb.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698