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

Issue 2981683002: Milo: Move buildbucket pubsub sub from buildbucket project to milo project (Closed)

Created:
3 years, 5 months ago by Ryan Tseng
Modified:
3 years, 5 months ago
Reviewers:
iannucci, nodir
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Milo: Move buildbucket pubsub sub from buildbucket project to milo project This moves (for instance) the subscription from: projects/cr-buildbucket/subscriptions/luci-milo to: projects/luci-milo/subscriptions/buildbucket This removes a series of complex steps when setting up the pubsub pipeline. Nothing else changes. BUG=624960 Review-Url: https://codereview.chromium.org/2981683002 Committed: https://github.com/luci/luci-go/commit/4bfe11ebfbb203db86104241a7a748df16f507ef

Patch Set 1 #

Patch Set 2 : subID -> appID #

Total comments: 6

Patch Set 3 : review #

Total comments: 11

Patch Set 4 : Fixes #

Total comments: 10

Patch Set 5 : Use factories #

Patch Set 6 : luciErrors -> errors #

Patch Set 7 : luciErrors -> errors #

Total comments: 5

Patch Set 8 : Make factory just a type signature #

Patch Set 9 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -104 lines) Patch
M milo/common/pubsub.go View 1 2 3 4 5 6 7 8 8 chunks +48 lines, -85 lines 0 comments Download
M milo/common/pubsub_test.go View 1 2 3 4 5 6 7 6 chunks +47 lines, -19 lines 0 comments Download

Messages

Total messages: 56 (32 generated)
Ryan Tseng
ptal. As per vadim's suggestion, this removes that annoying 4 step process for webmaster verification.
3 years, 5 months ago (2017-07-12 21:15:58 UTC) #6
nodir
https://codereview.chromium.org/2981683002/diff/20001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/20001/milo/common/pubsub.go#newcode100 milo/common/pubsub.go:100: return nil, fmt.Errorf("no pubsub clients installed for" + projectID) ...
3 years, 5 months ago (2017-07-12 21:31:12 UTC) #9
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/20001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/20001/milo/common/pubsub.go#newcode100 milo/common/pubsub.go:100: return nil, fmt.Errorf("no pubsub clients installed for" + projectID) ...
3 years, 5 months ago (2017-07-12 22:26:08 UTC) #14
nodir
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode65 milo/common/pubsub.go:65: lock: sync.RWMutex{}, this line is noop, unnecessary https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: ...
3 years, 5 months ago (2017-07-12 23:06:58 UTC) #15
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode65 milo/common/pubsub.go:65: lock: sync.RWMutex{}, On 2017/07/12 23:06:58, nodir wrote: > this ...
3 years, 5 months ago (2017-07-13 01:08:27 UTC) #20
iannucci
fwiw, this lgtm, though I have less understanding of the pubsub interactions than most. https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go ...
3 years, 5 months ago (2017-07-13 01:54:02 UTC) #21
nodir
https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go#newcode125 milo/common/pubsub.go:125: client, err := pubsub.NewClient(c, projectID) Just noticed c here. ...
3 years, 5 months ago (2017-07-13 02:07:11 UTC) #22
iannucci
https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go#newcode57 milo/common/pubsub.go:57: type pubsubClients struct { now that I'm looking at ...
3 years, 5 months ago (2017-07-13 02:16:27 UTC) #23
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/60001/milo/common/pubsub.go#newcode125 milo/common/pubsub.go:125: client, err := pubsub.NewClient(c, projectID) On 2017/07/13 02:07:11, nodir ...
3 years, 5 months ago (2017-07-13 02:27:18 UTC) #24
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: clients.clients[projectID] = &prodPubSubClient{c, client} On 2017/07/13 01:08:26, Ryan Tseng ...
3 years, 5 months ago (2017-07-13 02:42:57 UTC) #25
nodir
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: clients.clients[projectID] = &prodPubSubClient{c, client} On 2017/07/13 02:42:57, Ryan Tseng ...
3 years, 5 months ago (2017-07-13 05:58:46 UTC) #26
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: clients.clients[projectID] = &prodPubSubClient{c, client} On 2017/07/13 05:58:46, nodir wrote: ...
3 years, 5 months ago (2017-07-13 18:02:31 UTC) #27
nodir
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: clients.clients[projectID] = &prodPubSubClient{c, client} On 2017/07/13 18:02:30, Ryan Tseng ...
3 years, 5 months ago (2017-07-13 19:38:40 UTC) #28
nodir
https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/40001/milo/common/pubsub.go#newcode137 milo/common/pubsub.go:137: clients.clients[projectID] = &prodPubSubClient{c, client} On 2017/07/13 19:38:39, nodir wrote: ...
3 years, 5 months ago (2017-07-13 21:55:00 UTC) #29
Ryan Tseng
Discussed briefly with iannucci, decided to install a pubsub client factory into the context instead ...
3 years, 5 months ago (2017-07-13 22:28:36 UTC) #30
Ryan Tseng
ptal latest patchset. It uses client factories in context instead of clients in context. I ...
3 years, 5 months ago (2017-07-14 00:51:06 UTC) #35
nodir
lgtm https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go#newcode57 milo/common/pubsub.go:57: type pubsubClientFactory interface { wouldn't type pubsubClientFactory func(ctx ...
3 years, 5 months ago (2017-07-14 01:09:04 UTC) #40
Ryan Tseng
https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go#newcode57 milo/common/pubsub.go:57: type pubsubClientFactory interface { On 2017/07/14 01:09:04, nodir wrote: ...
3 years, 5 months ago (2017-07-14 17:41:50 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2981683002/160001
3 years, 5 months ago (2017-07-14 17:42:03 UTC) #49
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://github.com/luci/luci-go/commit/4bfe11ebfbb203db86104241a7a748df16f507ef
3 years, 5 months ago (2017-07-14 17:48:16 UTC) #52
nodir
https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go File milo/common/pubsub.go (right): https://codereview.chromium.org/2981683002/diff/120001/milo/common/pubsub.go#newcode57 milo/common/pubsub.go:57: type pubsubClientFactory interface { On 2017/07/14 17:41:49, Ryan Tseng ...
3 years, 5 months ago (2017-07-14 18:20:03 UTC) #53
Ryan Tseng
What if you stuck it in an interface and back out again? https://play.golang.org/p/QveWZ1MQ1s
3 years, 5 months ago (2017-07-14 18:26:56 UTC) #54
nodir
On 2017/07/14 18:26:56, Ryan Tseng wrote: > What if you stuck it in an interface ...
3 years, 5 months ago (2017-07-14 18:34:37 UTC) #55
Ryan Tseng
3 years, 5 months ago (2017-07-14 19:00:54 UTC) #56
Message was sent while issue was closed.
I see, so a generic function conforming to a function type cannot be cased into
the specific function type, but it can be casted to an interface matching the
function type and then assigned to a variable of that function type.

thanks for the clarification.

Powered by Google App Engine
This is Rietveld 408576698