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

Issue 6441169: rework state charm usage

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

Description

rework state charm usage * Nothing has CharmURL or SetCharmURL methods any more * Unit lost all upgrade-related methods * Service.SetCharm also takes a force bool param * Service.Charm returns a Charm with an additional Force field * Service.WatchCharm produces the same thing that Service.Charm does * oh, and, removed uniter/charm.UpgradingForced https://code.launchpad.net/~fwereade/juju-core/rework-state-charms/+merge/120566 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : rework state charm usage #

Total comments: 6

Patch Set 3 : rework state charm usage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -312 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/deploy_test.go View 1 1 chunk +3 lines, -3 lines 0 comments Download
M cmd/juju/status.go View 1 1 chunk +1 line, -1 line 0 comments Download
M state/service.go View 1 2 4 chunks +51 lines, -42 lines 0 comments Download
M state/service_test.go View 1 2 2 chunks +66 lines, -10 lines 0 comments Download
M state/state.go View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M state/state_test.go View 1 1 chunk +7 lines, -4 lines 0 comments Download
M state/unit.go View 1 2 5 chunks +9 lines, -89 lines 0 comments Download
M state/unit_test.go View 3 chunks +9 lines, -106 lines 0 comments Download
M state/watcher.go View 1 2 chunks +52 lines, -48 lines 0 comments Download
M state/watcher/watcher_test.go View 1 chunk +1 line, -1 line 0 comments Download
M worker/uniter/charm/charm.go View 1 chunk +5 lines, -6 lines 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 8 months ago (2012-08-21 13:36:44 UTC) #1
niemeyer
https://codereview.appspot.com/6441169/diff/1/state/service.go File state/service.go (right): https://codereview.appspot.com/6441169/diff/1/state/service.go#newcode31 state/service.go:31: // ServiceCharm describes the charm that units of the ...
11 years, 8 months ago (2012-08-21 13:45:50 UTC) #2
fwereade
Please take a look. https://codereview.appspot.com/6441169/diff/1/state/service.go File state/service.go (right): https://codereview.appspot.com/6441169/diff/1/state/service.go#newcode31 state/service.go:31: // ServiceCharm describes the charm ...
11 years, 8 months ago (2012-08-21 14:54:39 UTC) #3
niemeyer
Thanks, LGTM given the following details sorted: https://codereview.appspot.com/6441169/diff/4002/state/service_test.go File state/service_test.go (right): https://codereview.appspot.com/6441169/diff/4002/state/service_test.go#newcode33 state/service_test.go:33: // TODO: ...
11 years, 8 months ago (2012-08-21 15:07:36 UTC) #4
fwereade
11 years, 8 months ago (2012-08-21 15:41:45 UTC) #5
*** Submitted:

rework state charm usage

* Nothing has CharmURL or SetCharmURL methods any more
* Unit lost all upgrade-related methods
* Service.SetCharm also takes a force bool param
* Service.Charm returns a Charm with an additional Force field
* Service.WatchCharm produces the same thing that Service.Charm does
* oh, and, removed uniter/charm.UpgradingForced

R=niemeyer
CC=
https://codereview.appspot.com/6441169

https://codereview.appspot.com/6441169/diff/4002/state/service_test.go
File state/service_test.go (right):

https://codereview.appspot.com/6441169/diff/4002/state/service_test.go#newcode33
state/service_test.go:33: // TODO: changing the charm like this is not
especially sane in itself.
On 2012/08/21 15:07:36, niemeyer wrote:
> // TODO SetCharm must validate the change (version, relations, etc).

Done.

https://codereview.appspot.com/6441169/diff/4002/state/service_test.go#newcod...
state/service_test.go:275: w := s.service.WatchCharm()
On 2012/08/21 15:07:36, niemeyer wrote:
> defer w.Stop()?

Done.

https://codereview.appspot.com/6441169/diff/4002/state/state.go
File state/state.go (right):

https://codereview.appspot.com/6441169/diff/4002/state/state.go#newcode171
state/state.go:171: "charm-url":   ch.URL().String(),
On 2012/08/21 15:07:36, niemeyer wrote:
> A charm URL stringifies itself correctly when being inserted.
> 
> It also feels like this should be "charm" rather than "charm-url" (parallel
with
> "unit-name" vs. "unit", "service-name" vs. "service", "machine-id" vs.
> "machine").

Done.
Sign in to reply to this message.

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