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

Issue 20940043: state/apiserver/uniter: use cached APIAddresses

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

Description

state/apiserver/uniter: use cached APIAddresses When Roger changed the common.Addresser code to use the cached addresses, he missed the fact that Uniter had its own implementation. This was because we weren't exposing StateAddress or CACert to the Uniter. So this change moves the code around to share the common APIAddresses method and uses it in the Uniter facade. https://code.launchpad.net/~jameinel/juju-core/uniter-cached-addresses/+merge/193650 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : state/apiserver/uniter: use cached APIAddresses #

Patch Set 3 : state/apiserver/uniter: use cached APIAddresses #

Total comments: 4

Patch Set 4 : state/apiserver/uniter: use cached APIAddresses #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -89 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/uniter/state_test.go View 1 2 3 2 chunks +16 lines, -3 lines 0 comments Download
M state/apiserver/common/addresses.go View 1 2 chunks +37 lines, -35 lines 0 comments Download
M state/apiserver/common/addresses_test.go View 1 1 chunk +24 lines, -18 lines 0 comments Download
M state/apiserver/deployer/deployer.go View 1 2 chunks +4 lines, -2 lines 0 comments Download
M state/apiserver/provisioner/provisioner.go View 1 2 chunks +4 lines, -2 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 4 chunks +2 lines, -27 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 chunk +4 lines, -2 lines 0 comments Download
M worker/uniter/uniter_test.go View 1 2 3 4 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 8
jameinel
Please take a look.
10 years, 6 months ago (2013-11-01 19:21:51 UTC) #1
rog
LGTM with a couple of passing thoughts. https://codereview.appspot.com/20940043/diff/1/state/apiserver/common/addresses.go File state/apiserver/common/addresses.go (right): https://codereview.appspot.com/20940043/diff/1/state/apiserver/common/addresses.go#newcode19 state/apiserver/common/addresses.go:19: type APIAddresser ...
10 years, 6 months ago (2013-11-01 20:00:07 UTC) #2
jameinel
Please take a look.
10 years, 6 months ago (2013-11-01 21:12:58 UTC) #3
jameinel
Please take a look.
10 years, 6 months ago (2013-11-04 10:41:40 UTC) #4
dimitern
https://codereview.appspot.com/20940043/diff/40001/state/apiserver/common/addresses.go File state/apiserver/common/addresses.go (left): https://codereview.appspot.com/20940043/diff/40001/state/apiserver/common/addresses.go#oldcode33 state/apiserver/common/addresses.go:33: // TODO(dimitern): Remove this once we have a way ...
10 years, 6 months ago (2013-11-04 10:48:57 UTC) #5
fwereade
LGTM, but I thought we'd need a CACerter (as it were). Do we always just ...
10 years, 6 months ago (2013-11-06 10:18:27 UTC) #6
jameinel
On 2013/11/06 10:18:27, fwereade wrote: > LGTM, but I thought we'd need a CACerter (as ...
10 years, 6 months ago (2013-11-06 11:38:54 UTC) #7
jameinel
10 years, 6 months ago (2013-11-06 11:40:55 UTC) #8
Please take a look.

https://codereview.appspot.com/20940043/diff/40001/state/apiserver/common/add...
File state/apiserver/common/addresses.go (left):

https://codereview.appspot.com/20940043/diff/40001/state/apiserver/common/add...
state/apiserver/common/addresses.go:33: // TODO(dimitern): Remove this once we
have a way to get state/API
On 2013/11/04 10:48:58, dimitern wrote:
> Please, assign this bug to you and link this branch?

Done.

https://codereview.appspot.com/20940043/diff/40001/worker/uniter/uniter_test.go
File worker/uniter/uniter_test.go (right):

https://codereview.appspot.com/20940043/diff/40001/worker/uniter/uniter_test....
worker/uniter/uniter_test.go:1109: func (s ensureStateWorker) step(c *gc.C, ctx
*context) {
On 2013/11/06 10:18:28, fwereade wrote:
> Can't we just jam this into createUniter?

Done.

There is still 1 path that doesn't call createUniter because it didn't want to
have the wait, but it does reduce how many things need it.
I had originally done quickStart, but actually quite a few tests don't call that
one. createUniter is much more prevalent.
Sign in to reply to this message.

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