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

Issue 6906046: state: subordinates created in EnterScope

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by fwereade
Modified:
11 years, 4 months ago
Reviewers:
mp+138742, dave, niemeyer
Visibility:
Public.

Description

state: subordinates created in EnterScope This renders Service.AddUnitSubordinateTo redundant... *except* in tests. Removing it and fixing all the tests is a monstrous job that would result in a suitably monstrous diff; a series of followups will resolve this situation, but for the moment it's intractable. https://code.launchpad.net/~fwereade/juju-core/state-ensure-subordinate/+merge/138742 Requires: https://code.launchpad.net/~fwereade/juju-core/dying-unit-enter-scope/+merge/137585 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 22

Patch Set 2 : state: add RelationUnit.EnsureSubordinate #

Total comments: 15

Patch Set 3 : state: subordinates created in EnterScope #

Total comments: 1

Patch Set 4 : state: subordinates created in EnterScope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -112 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M state/life.go View 1 2 3 3 chunks +8 lines, -3 lines 0 comments Download
M state/machine.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M state/relation.go View 1 2 3 2 chunks +65 lines, -26 lines 0 comments Download
M state/relation_test.go View 1 2 6 chunks +48 lines, -3 lines 0 comments Download
M state/service.go View 1 2 3 9 chunks +84 lines, -65 lines 0 comments Download
M state/service_test.go View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M state/state.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/unit.go View 1 2 3 8 chunks +9 lines, -8 lines 0 comments Download

Messages

Total messages: 8
fwereade
Please take a look.
11 years, 4 months ago (2012-12-07 14:41:56 UTC) #1
dave_cheney.net
LGTM. The comments about err shadowing and ErrorContext may or may not be relevant. https://codereview.appspot.com/6906046/diff/1/state/relation.go ...
11 years, 4 months ago (2012-12-10 03:14:13 UTC) #2
rog
looks fine. just one or two queries and suggestions. https://codereview.appspot.com/6906046/diff/1/state/life.go File state/life.go (right): https://codereview.appspot.com/6906046/diff/1/state/life.go#newcode84 state/life.go:84: ...
11 years, 4 months ago (2012-12-11 11:21:36 UTC) #3
fwereade
Please take a look. https://codereview.appspot.com/6906046/diff/1/state/life.go File state/life.go (right): https://codereview.appspot.com/6906046/diff/1/state/life.go#newcode84 state/life.go:84: func getAlive(coll *mgo.Collection, id interface{}) ...
11 years, 4 months ago (2012-12-12 08:47:10 UTC) #4
niemeyer
https://codereview.appspot.com/6906046/diff/1/state/life.go File state/life.go (right): https://codereview.appspot.com/6906046/diff/1/state/life.go#newcode84 state/life.go:84: func getAlive(coll *mgo.Collection, id interface{}) (bool, error) { On ...
11 years, 4 months ago (2012-12-13 14:37:26 UTC) #5
fwereade
Please take a look. https://codereview.appspot.com/6906046/diff/7001/state/life.go File state/life.go (right): https://codereview.appspot.com/6906046/diff/7001/state/life.go#newcode86 state/life.go:86: if err := coll.FindId(id).One(&doc); err ...
11 years, 4 months ago (2012-12-14 15:39:02 UTC) #6
niemeyer
LGTM, just one detail that I was unclear about: https://codereview.appspot.com/6906046/diff/15001/state/life.go File state/life.go (right): https://codereview.appspot.com/6906046/diff/15001/state/life.go#newcode84 state/life.go:84: ...
11 years, 4 months ago (2012-12-14 16:19:14 UTC) #7
fwereade
11 years, 4 months ago (2012-12-14 16:57:31 UTC) #8
*** Submitted:

state: subordinates created in EnterScope

This renders Service.AddUnitSubordinateTo redundant... *except* in tests.
Removing it and fixing all the tests is a monstrous job that would result
in a suitably monstrous diff; a series of followups will resolve this
situation, but for the moment it's intractable.

R=dfc, rog, niemeyer
CC=
https://codereview.appspot.com/6906046
Sign in to reply to this message.

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