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

Issue 85670046: worker/uniter: startup with correct relation state

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by fwereade
Modified:
10 years ago
Reviewers:
mp+215003, hduran, jameinel
Visibility:
Public.

Description

worker/uniter: startup with correct relation state The uniter's runListener is not started until after relation state is set up; and relation state setup is fixed to use true relation state from the API server rather than the local best guess, which is inaccurate when any joined relation has never seen a remote unit. This involves a new API, which the unit agent will wait for, in case it connects to an API server which hasn't yet been upgraded. https://code.launchpad.net/~fwereade/juju-core/uniter-relation-states/+merge/215003 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -67 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/uniter/unit.go View 1 chunk +20 lines, -0 lines 2 comments Download
M state/api/uniter/unit_test.go View 2 chunks +19 lines, -0 lines 0 comments Download
M state/api/uniter/uniter.go View 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/uniter/uniter.go View 1 chunk +38 lines, -0 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 chunk +31 lines, -0 lines 0 comments Download
M state/unit.go View 1 chunk +21 lines, -0 lines 0 comments Download
M state/unit_test.go View 1 chunk +41 lines, -0 lines 0 comments Download
M testing/filetesting/filetesting_test.go View 2 chunks +2 lines, -0 lines 0 comments Download
M worker/uniter/modes.go View 1 chunk +0 lines, -10 lines 0 comments Download
M worker/uniter/relationer.go View 2 chunks +6 lines, -4 lines 0 comments Download
M worker/uniter/relationer_test.go View 6 chunks +28 lines, -13 lines 0 comments Download
M worker/uniter/uniter.go View 4 chunks +75 lines, -38 lines 0 comments Download
M worker/uniter/uniter_test.go View 4 chunks +72 lines, -1 line 0 comments Download

Messages

Total messages: 4
fwereade
Please take a look.
10 years ago (2014-04-09 17:37:00 UTC) #1
hduran
https://codereview.appspot.com/85670046/diff/1/state/api/uniter/unit.go File state/api/uniter/unit.go (right): https://codereview.appspot.com/85670046/diff/1/state/api/uniter/unit.go#newcode445 state/api/uniter/unit.go:445: return nil, fmt.Errorf("expected one result, got %d", len(results.Results)) This ...
10 years ago (2014-04-09 17:47:10 UTC) #2
jameinel
LGTM, though mostly from matching the code to your description of what it is doing.
10 years ago (2014-04-09 22:19:27 UTC) #3
fwereade
10 years ago (2014-04-10 12:48:54 UTC) #4
https://codereview.appspot.com/85670046/diff/1/state/api/uniter/unit.go
File state/api/uniter/unit.go (right):

https://codereview.appspot.com/85670046/diff/1/state/api/uniter/unit.go#newco...
state/api/uniter/unit.go:445: return nil, fmt.Errorf("expected one result, got
%d", len(results.Results))
On 2014/04/09 17:47:11, hduran wrote:
> This is purely aesthetic and not sure if valid for English but if got %d
prints
> a number, "one" should also be a number. 

FWIW, style guides I've seen have suggested that you should always spell out
numbers below N, for varying N. Being consistent works for me though; done.
Sign in to reply to this message.

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