Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1428)

Issue 86200043: cmd/jujud: wrap singular workers

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by rog
Modified:
10 years ago
Reviewers:
mp+215035, natefinch
Visibility:
Public.

Description

cmd/jujud: wrap singular workers We start the various workers that require only a single instance to be running via the runner returned by singular.New. This is awkward to test - we just do a basic sanity check that the right workers are started through the singular runner. https://code.launchpad.net/~rogpeppe/juju-core/mfoord-wrapsingletonworkers/+merge/215035 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: wrap singular workers #

Patch Set 3 : cmd/jujud: wrap singular workers #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -17 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M agent/mongo/mongo.go View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M cmd/jujud/machine.go View 10 chunks +66 lines, -15 lines 2 comments Download
M cmd/jujud/machine_test.go View 1 2 6 chunks +49 lines, -0 lines 2 comments Download
M replicaset/replicaset.go View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M replicaset/replicaset_test.go View 1 2 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
10 years ago (2014-04-09 21:11:30 UTC) #1
rog
Please take a look.
10 years ago (2014-04-10 09:59:19 UTC) #2
natefinch
LGTM with just a couple minor suggestions. https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine.go File cmd/jujud/machine.go (right): https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine.go#newcode253 cmd/jujud/machine.go:253: conn := ...
10 years ago (2014-04-10 11:14:38 UTC) #3
rog
10 years ago (2014-04-10 11:38:21 UTC) #4
https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine.go
File cmd/jujud/machine.go (right):

https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine.go#newco...
cmd/jujud/machine.go:253: conn := singularAPIConn{st, st.Agent()}
On 2014/04/10 11:14:38, nate.finch wrote:
> could this code get moved to the loop over entity.jobs below?  It diesn't seem
> to neec to be here, and it puts the declaration far from the use of the
> variable.

i don't we can do this, because newSingularRunner can fail, and if that happens
we don't want to leave the other jobs running.

https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine_test.go
File cmd/jujud/machine_test.go (right):

https://codereview.appspot.com/86200043/diff/40001/cmd/jujud/machine_test.go#...
cmd/jujud/machine_test.go:384: c.Assert(s.singularRecord.started(),
jc.DeepEquals, []string{
On 2014/04/10 11:14:38, nate.finch wrote:
> This checks order of the slice, too, right?  Does the order matter?  If not,
we
> may want to use jc.SameContents here, so we don't fail the test if the order
> changes.

the slice is sorted (see the implementation of the started method)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b