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

Issue 13383046: api(server)/uniter: Fix (result, bool, error) (Closed)

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

Description

api(server)/uniter: Fix (result, bool, error) Change PublicAddress, PrivateAddress and CharmURL to return (result, error) instead of (result, bool, error), as discussed online, because since more than one error can be returned the bool result is no longer sufficient. Also, the first two calls where changed at the server-side as well, while the last one only at client-side for units, because for services it has different semantics (the bool means "forced" charm URL or not). https://code.launchpad.net/~dimitern/juju-core/115-api-uniter-fix-result-ok-calls/+merge/183488 Requires: https://code.launchpad.net/~dimitern/juju-core/114-api-uniter-names-to-tags/+merge/183481 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : api(server)/uniter: Fix (result, bool, error) #

Total comments: 2

Patch Set 3 : api(server)/uniter: Fix (result, bool, error) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -79 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/uniter/relationunit.go View 1 chunk +3 lines, -2 lines 0 comments Download
M state/api/uniter/unit.go View 1 2 3 chunks +23 lines, -23 lines 0 comments Download
M state/api/uniter/uniter_test.go View 1 2 3 chunks +9 lines, -18 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 1 2 5 chunks +21 lines, -16 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 2 chunks +45 lines, -20 lines 0 comments Download

Messages

Total messages: 5
dimitern
Please take a look.
10 years, 8 months ago (2013-09-02 15:22:09 UTC) #1
fwereade
not quite there https://codereview.appspot.com/13383046/diff/1/state/api/uniter/uniter_test.go File state/api/uniter/uniter_test.go (left): https://codereview.appspot.com/13383046/diff/1/state/api/uniter/uniter_test.go#oldcode307 state/api/uniter/uniter_test.go:307: c.Assert(err, gc.IsNil) This should have become ...
10 years, 8 months ago (2013-09-02 15:28:12 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/13383046/diff/1/state/api/uniter/uniter_test.go File state/api/uniter/uniter_test.go (left): https://codereview.appspot.com/13383046/diff/1/state/api/uniter/uniter_test.go#oldcode307 state/api/uniter/uniter_test.go:307: c.Assert(err, gc.IsNil) On 2013/09/02 15:28:12, ...
10 years, 8 months ago (2013-09-02 15:53:11 UTC) #3
fwereade
LGTM except one fix https://codereview.appspot.com/13383046/diff/5001/state/api/uniter/uniter_test.go File state/api/uniter/uniter_test.go (right): https://codereview.appspot.com/13383046/diff/5001/state/api/uniter/uniter_test.go#newcode363 state/api/uniter/uniter_test.go:363: c.Assert(err, gc.IsNil) This should be ...
10 years, 8 months ago (2013-09-02 16:14:18 UTC) #4
dimitern
10 years, 8 months ago (2013-09-02 16:40:50 UTC) #5
Please take a look.

https://codereview.appspot.com/13383046/diff/5001/state/api/uniter/uniter_tes...
File state/api/uniter/uniter_test.go (right):

https://codereview.appspot.com/13383046/diff/5001/state/api/uniter/uniter_tes...
state/api/uniter/uniter_test.go:363: c.Assert(err, gc.IsNil)
On 2013/09/02 16:14:18, fwereade wrote:
> This should be an error.

Done.
Sign in to reply to this message.

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