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

Issue 10854043: Implement AssignClean and AssignCleanEmpty (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by wallyworld
Modified:
10 years, 9 months ago
Reviewers:
mp+172452, dave, thumper, fwereade
Visibility:
Public.

Description

Implement AssignClean and AssignCleanEmpty This branch removes the AssignUnused policy and instead provides an implementation for AssignClean and AssignEmpty. The tests were refactored so that all the existing AssignUnused tests were added to a suite and run using the same code for the clean and clean/empty cases. https://code.launchpad.net/~wallyworld/juju-core/reuse-assign-policy/+merge/172452 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 17

Patch Set 2 : Implement AssignClean and AssignCleanEmpty #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+346 lines, -184 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/assign_test.go View 1 13 chunks +270 lines, -168 lines 1 comment Download
M state/bench_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/state.go View 1 chunk +7 lines, -2 lines 1 comment Download
M state/unit.go View 1 5 chunks +66 lines, -13 lines 2 comments Download

Messages

Total messages: 7
wallyworld
Please take a look.
10 years, 9 months ago (2013-07-02 01:07:38 UTC) #1
thumper
https://codereview.appspot.com/10854043/diff/1/state/assign_test.go File state/assign_test.go (right): https://codereview.appspot.com/10854043/diff/1/state/assign_test.go#newcode481 state/assign_test.go:481: _, err := s.State.AddMachine("series", state.JobManageEnviron) // bootstrap machine the ...
10 years, 9 months ago (2013-07-02 02:11:25 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/10854043/diff/1/state/assign_test.go File state/assign_test.go (right): https://codereview.appspot.com/10854043/diff/1/state/assign_test.go#newcode527 state/assign_test.go:527: } else { On 2013/07/02 ...
10 years, 9 months ago (2013-07-02 05:30:48 UTC) #3
fwereade
I think I'd rather see this as a single assignment policy for now... and I ...
10 years, 9 months ago (2013-07-03 10:43:56 UTC) #4
wallyworld
If it were to be a single policy, which one? Clean or CleanEmpty? I think ...
10 years, 9 months ago (2013-07-03 12:10:49 UTC) #5
thumper
On 2013/07/03 12:10:49, wallyworld wrote: > If it were to be a single policy, which ...
10 years, 9 months ago (2013-07-08 02:40:52 UTC) #6
dave_cheney.net
10 years, 9 months ago (2013-07-08 03:16:02 UTC) #7
LGTM. I have no position on the number of policies, that is between you and your
maker.

https://codereview.appspot.com/10854043/diff/7001/state/assign_test.go
File state/assign_test.go (right):

https://codereview.appspot.com/10854043/diff/7001/state/assign_test.go#newcode12
state/assign_test.go:12: . "launchpad.net/juju-core/testing/checkers"
wasn't there some discussion about this style ? I thought they were going to be
imported as gc and jc

https://codereview.appspot.com/10854043/diff/7001/state/state.go
File state/state.go (right):

https://codereview.appspot.com/10854043/diff/7001/state/state.go#newcode1133
state/state.go:1133: panic(fmt.Errorf("unknown unit assignment policy: %q",
policy))
Why panic, you can return an error here
Sign in to reply to this message.

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