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

Issue 1402543003: Add initial middleware package. (Closed)

Created:
5 years, 2 months ago by iannucci
Modified:
5 years, 2 months ago
CC:
andrew.wang, chromium-reviews, infra-reviews+luci-go_chromium.org, M-A Ruel, tandrii(chromium), todd
Base URL:
https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Add initial middleware package. We can have compatible middleware functions in other packages, but this will be a place to put generally applicable middlewares. R=dnj@chromium.org, estaab@chromium.org, maruel@chromium.org, tandrii@chromium.org, vadimsh@chromium.org BUG= Committed: https://github.com/luci/luci-go/commit/b86a389f3d25326e71e27dc7e801df56b828e372

Patch Set 1 #

Patch Set 2 : swap args to prevent ugly chains #

Total comments: 18

Patch Set 3 : fixit #

Patch Set 4 : comments #

Patch Set 5 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -0 lines) Patch
A appengine/middleware/appengine.go View 1 2 3 4 1 chunk +62 lines, -0 lines 0 comments Download
A appengine/middleware/appengine_test.go View 1 2 3 4 1 chunk +116 lines, -0 lines 0 comments Download
A appengine/middleware/context.go View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
A appengine/middleware/doc.go View 1 chunk +48 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (2 generated)
iannucci
5 years, 2 months ago (2015-10-13 01:11:20 UTC) #1
Vadim Sh.
lgtm with nits https://codereview.chromium.org/1402543003/diff/20001/appengine/middleware/appengine.go File appengine/middleware/appengine.go (right): https://codereview.chromium.org/1402543003/diff/20001/appengine/middleware/appengine.go#newcode19 appengine/middleware/appengine.go:19: if r.Header.Get("X-Appengine-Cron") != "true" { consider ...
5 years, 2 months ago (2015-10-13 01:29:14 UTC) #2
iannucci
https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go File appengine/middleware/appengine.go (right): https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go#newcode19 appengine/middleware/appengine.go:19: if r.Header.Get("X-Appengine-Cron") != "true" { On 2015/10/13 at 01:29:14, ...
5 years, 2 months ago (2015-10-13 01:37:18 UTC) #3
Vadim Sh.
https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go File appengine/middleware/appengine.go (right): https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go#newcode19 appengine/middleware/appengine.go:19: if r.Header.Get("X-Appengine-Cron") != "true" { On 2015/10/13 01:37:17, iannucci ...
5 years, 2 months ago (2015-10-13 01:40:26 UTC) #4
iannucci
On 2015/10/13 at 01:40:26, vadimsh wrote: > https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go > File appengine/middleware/appengine.go (right): > > https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go#newcode19 ...
5 years, 2 months ago (2015-10-13 01:41:38 UTC) #5
dnj
FTR: I don't like the 4-argument case. IMO at least the params should be wrapped ...
5 years, 2 months ago (2015-10-13 01:44:49 UTC) #6
Vadim Sh.
On 2015/10/13 01:41:38, iannucci wrote: > On 2015/10/13 at 01:40:26, vadimsh wrote: > > > ...
5 years, 2 months ago (2015-10-13 01:44:57 UTC) #7
iannucci
PTAL
5 years, 2 months ago (2015-10-13 01:46:25 UTC) #8
iannucci
On 2015/10/13 at 01:44:49, dnj wrote: > FTR: I don't like the 4-argument case. IMO ...
5 years, 2 months ago (2015-10-13 01:51:57 UTC) #9
iannucci
https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go File appengine/middleware/appengine.go (right): https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go#newcode21 appengine/middleware/appengine.go:21: fmt.Fprint(rw, "error: must be run from cron") On 2015/10/13 ...
5 years, 2 months ago (2015-10-13 01:56:34 UTC) #10
iannucci
Dan, did you have more comments?
5 years, 2 months ago (2015-10-13 03:12:42 UTC) #11
dnj
lgtm w/ nits/explanation. https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go File appengine/middleware/appengine.go (right): https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/appengine.go#newcode37 appengine/middleware/appengine.go:37: if qName == "" || (queue ...
5 years, 2 months ago (2015-10-13 04:39:11 UTC) #12
iannucci
https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/context.go File appengine/middleware/context.go (right): https://chromiumcodereview.appspot.com/1402543003/diff/20001/appengine/middleware/context.go#newcode24 appengine/middleware/context.go:24: func Base(h Handler) httprouter.Handle { On 2015/10/13 at 04:39:10, ...
5 years, 2 months ago (2015-10-13 04:52:29 UTC) #13
dnj
> > WDYT about moving this into a test example? > > I don't think ...
5 years, 2 months ago (2015-10-13 04:57:58 UTC) #14
iannucci
On 2015/10/13 at 04:57:58, dnj wrote: > > > WDYT about moving this into a ...
5 years, 2 months ago (2015-10-13 05:03:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1402543003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1402543003/80001
5 years, 2 months ago (2015-10-13 05:05:53 UTC) #18
commit-bot: I haz the power
5 years, 2 months ago (2015-10-13 05:07:54 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://github.com/luci/luci-go/commit/b86a389f3d25326e71e27dc7e801df56b828e372

Powered by Google App Engine
This is Rietveld 408576698