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

Issue 11932043: worker/upgrader: new package

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rog
Modified:
10 years, 9 months ago
Reviewers:
mp+177190, fwereade, dimitern
Visibility:
Public.

Description

worker/upgrader: new package Substantially simplified logic from when it lived in cmd/jujud, but it still has the same basic contract (it dies with a NeedsUpgrade error when upgraded). https://code.launchpad.net/~rogpeppe/juju-core/347-upgrader-api-worker/+merge/177190 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : worker/upgrader: new package #

Total comments: 23

Patch Set 3 : worker/upgrader: new package #

Patch Set 4 : worker/upgrader: new package #

Total comments: 4

Patch Set 5 : worker/upgrader: new package #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -4 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/state.go View 1 chunk +2 lines, -2 lines 0 comments Download
M state/api/upgrader/upgrader_test.go View 1 chunk +1 line, -2 lines 0 comments Download
A worker/upgrader/export_test.go View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
A worker/upgrader/upgrader.go View 1 2 3 4 1 chunk +167 lines, -0 lines 0 comments Download
A worker/upgrader/upgrader_test.go View 1 2 3 4 1 chunk +208 lines, -0 lines 0 comments Download

Messages

Total messages: 8
rog
Please take a look.
10 years, 9 months ago (2013-07-26 17:14:30 UTC) #1
fwereade
Looks great, but I have a few quibbles. I was kinda expecting a NotifyHandler, but ...
10 years, 9 months ago (2013-07-26 17:24:56 UTC) #2
dimitern
LGTM, modulo the suggestions below https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/export_test.go File worker/upgrader/export_test.go (right): https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/export_test.go#newcode1 worker/upgrader/export_test.go:1: package upgrader copyright comments ...
10 years, 9 months ago (2013-07-26 18:01:14 UTC) #3
rog
Please take a look. https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/upgrader.go File worker/upgrader/upgrader.go (right): https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/upgrader.go#newcode40 worker/upgrader/upgrader.go:40: var logger = loggo.GetLogger("juju.upgrader") On ...
10 years, 9 months ago (2013-07-29 09:03:37 UTC) #4
rog
Please take a look. https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/export_test.go File worker/upgrader/export_test.go (right): https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/export_test.go#newcode1 worker/upgrader/export_test.go:1: package upgrader On 2013/07/26 18:01:15, ...
10 years, 9 months ago (2013-07-29 09:07:13 UTC) #5
dimitern
> https://codereview.appspot.com/11932043/diff/3001/worker/upgrader/upgrader_test.go#newcode108 > worker/upgrader/upgrader_test.go:108: c.Assert(u.Stop(), gc.IsNil) > On 2013/07/26 18:01:15, dimitern wrote: > > statetesting.AssertStop(c, ...
10 years, 9 months ago (2013-07-29 09:10:08 UTC) #6
fwereade
LGTM -- but, re AssertStop, I do think it is actually kinda useful to have ...
10 years, 9 months ago (2013-07-29 09:21:33 UTC) #7
rog
10 years, 9 months ago (2013-07-29 09:41:44 UTC) #8
Please take a look.

https://codereview.appspot.com/11932043/diff/23001/worker/upgrader/upgrader.go
File worker/upgrader/upgrader.go (right):

https://codereview.appspot.com/11932043/diff/23001/worker/upgrader/upgrader.g...
worker/upgrader/upgrader.go:168: }
On 2013/07/29 09:21:33, fwereade wrote:
> Little quibble, but it might be nicer to return (agentTools, err) and
construct
> the UpgradeReadyError all at once.

done, slightly differently.

https://codereview.appspot.com/11932043/diff/23001/worker/upgrader/upgrader_t...
File worker/upgrader/upgrader_test.go (right):

https://codereview.appspot.com/11932043/diff/23001/worker/upgrader/upgrader_t...
worker/upgrader/upgrader_test.go:175: defer u.Stop()
as it happens, AssertStop is not appropriate
here, as the worker is known to die with an error.

i've changed the other occurrences to
AssertStop though, despite my preference
otherwise.
Sign in to reply to this message.

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