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

Issue 94540043: state: set departed on dying units' relations

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by fwereade
Modified:
9 years, 11 months ago
Reviewers:
gz, fwereade
Visibility:
Public.

Description

state: set departed on dying units' relations This ended up including: * stopping using magic strings in cleanup * drawing a clear distinction between "joined" and "in scope" (which accounts for most of the lines of changes) ...but did *not* include: * fixing the name of the Uniter.JoinedRelations API, because I want to wait for API versioning https://code.launchpad.net/~fwereade/juju-core/use-prepare-leave-scope/+merge/219758 Requires: https://code.launchpad.net/~fwereade/juju-core/prepare-leave-scope/+merge/181065 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : WIP: notify imminent relation departure #

Patch Set 3 : state: set departed on dying units' relations #

Total comments: 1

Patch Set 4 : state: set departed on dying units' relations #

Patch Set 5 : state: set departed on dying units' relations #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -121 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 1 2 3 3 chunks +6 lines, -4 lines 2 comments Download
M state/apiserver/uniter/uniter_test.go View 1 2 3 1 chunk +26 lines, -20 lines 2 comments Download
M state/cleanup.go View 1 2 3 4 8 chunks +65 lines, -22 lines 0 comments Download
M state/cleanup_test.go View 1 2 3 8 chunks +82 lines, -11 lines 0 comments Download
M state/environ.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/machine.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/relation.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/relationunit.go View 1 2 3 1 chunk +15 lines, -2 lines 0 comments Download
M state/relationunit_test.go View 1 2 3 30 chunks +52 lines, -37 lines 0 comments Download
M state/service.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/service_test.go View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M state/unit.go View 1 2 3 2 chunks +27 lines, -8 lines 0 comments Download
M state/unit_test.go View 1 2 3 2 chunks +26 lines, -13 lines 0 comments Download

Messages

Total messages: 9
johnweldon4
https://codereview.appspot.com/94540043/diff/1/state/cleanup.go File state/cleanup.go (right): https://codereview.appspot.com/94540043/diff/1/state/cleanup.go#newcode59 state/cleanup.go:59: err = st.cleanupDyingUnit(doc.Prefix) should the parameter to cleanupDyingUnit be ...
9 years, 11 months ago (2014-05-16 03:59:26 UTC) #1
fwereade
On 2014/05/16 03:59:26, johnweldon4 wrote: > https://codereview.appspot.com/94540043/diff/1/state/cleanup.go > File state/cleanup.go (right): > > https://codereview.appspot.com/94540043/diff/1/state/cleanup.go#newcode59 > ...
9 years, 11 months ago (2014-05-19 14:32:35 UTC) #2
fwereade
Please take a look.
9 years, 11 months ago (2014-05-19 14:39:02 UTC) #3
fwereade
Please take a look.
9 years, 11 months ago (2014-05-19 15:01:46 UTC) #4
fwereade
This needs better tests, FWIW: I should explicitly exercise the cases where (eg) the unit ...
9 years, 11 months ago (2014-05-19 16:14:42 UTC) #5
fwereade
Please take a look.
9 years, 11 months ago (2014-05-20 22:02:40 UTC) #6
fwereade
Please take a look.
9 years, 11 months ago (2014-05-21 08:58:11 UTC) #7
gz
LGTM. Does this still want more tests past those added in the prereq? https://codereview.appspot.com/94540043/diff/80001/state/apiserver/uniter/uniter.go File ...
9 years, 11 months ago (2014-05-21 20:18:45 UTC) #8
fwereade
9 years, 11 months ago (2014-05-22 09:16:46 UTC) #9
I think I actually have sufficient coverage with the tests that are there; the
cleanup tests hit both the happiest and the saddest path, and the pre-existing
tests cover PrepareLeaveScope itself.

https://codereview.appspot.com/94540043/diff/80001/state/apiserver/uniter/uni...
File state/apiserver/uniter/uniter.go (right):

https://codereview.appspot.com/94540043/diff/80001/state/apiserver/uniter/uni...
state/apiserver/uniter/uniter.go:711: // on making that change until we have API
versioning.
On 2014/05/21 20:18:45, gz wrote:
> Nit, I'd generally avoid first person in doc comment things, versus random
TODO
> type comments where it's fine. Could be "Rename to RelationsInScope when API
> versioning is introduced and makes it safe to do so." or similar.

Done.

https://codereview.appspot.com/94540043/diff/80001/state/apiserver/uniter/uni...
File state/apiserver/uniter/uniter_test.go (right):

https://codereview.appspot.com/94540043/diff/80001/state/apiserver/uniter/uni...
state/apiserver/uniter/uniter_test.go:1058: check := func() {
On 2014/05/21 20:18:45, gz wrote:
> I'd put the args and expected result outside the closure.

Done.
Sign in to reply to this message.

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