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

Issue 12698043: apiserver: Uniter API unit ops (cont.) (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+179448, jameinel, natefinch, fwereade, gz, rog
Visibility:
Public.

Description

apiserver: Uniter API unit ops (cont.) Implemeted a few additional uniter API unit methods: * Destroy * GetPrincipal * SubordinateNames * ClearResolved https://code.launchpad.net/~dimitern/juju-core/095-api-uniter-unit-ops3/+merge/179448 Requires: https://code.launchpad.net/~dimitern/juju-core/094-apiserver-uniter-unit-ops2/+merge/179421 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : apiserver: Uniter API unit ops (cont.) #

Total comments: 6

Patch Set 3 : apiserver: Uniter API unit ops (cont.) #

Patch Set 4 : apiserver: Uniter API unit ops (cont.) #

Patch Set 5 : apiserver: Uniter API unit ops (cont.) #

Total comments: 18

Patch Set 6 : apiserver: Uniter API unit ops (cont.) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -23 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/params/internal.go View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 1 2 3 4 5 7 chunks +125 lines, -21 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 2 3 4 5 3 chunks +145 lines, -0 lines 0 comments Download
M state/apiserver/upgrader/upgrader_test.go View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13
dimitern
Please take a look.
10 years, 8 months ago (2013-08-09 13:50:55 UTC) #1
dimitern
Please take a look.
10 years, 8 months ago (2013-08-09 13:52:30 UTC) #2
fwereade
not a review, just a couple of comments https://codereview.appspot.com/12698043/diff/7001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12698043/diff/7001/state/apiserver/uniter/uniter.go#newcode173 state/apiserver/uniter/uniter.go:173: func ...
10 years, 8 months ago (2013-08-09 14:40:36 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/12698043/diff/7001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12698043/diff/7001/state/apiserver/uniter/uniter.go#newcode173 state/apiserver/uniter/uniter.go:173: func (u *UniterAPI) SetResolved(args params.SetEntitiesResolved) ...
10 years, 8 months ago (2013-08-09 14:49:46 UTC) #4
dimitern
Please take a look.
10 years, 8 months ago (2013-08-09 14:54:19 UTC) #5
dimitern
Please take a look.
10 years, 8 months ago (2013-08-09 15:44:58 UTC) #6
natefinch
LGTM. If it were me, I'd make the table driven tests have the inputs and ...
10 years, 8 months ago (2013-08-09 16:31:32 UTC) #7
jameinel
On 2013/08/09 16:31:32, nate.finch wrote: > LGTM. If it were me, I'd make the table ...
10 years, 8 months ago (2013-08-10 15:16:33 UTC) #8
gz
LGTM if the calls get the permissions right, see comments. https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go#newcode177 ...
10 years, 8 months ago (2013-08-12 09:01:54 UTC) #9
rog
LGTM module the below suggestions and +1 to other people's comments. https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): ...
10 years, 8 months ago (2013-08-12 09:12:52 UTC) #10
dimitern
Please take a look. https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go#newcode177 state/apiserver/uniter/uniter.go:177: canModify, err := u.getCanRead() On ...
10 years, 8 months ago (2013-08-12 09:25:50 UTC) #11
rog
https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uniter.go#newcode265 state/apiserver/uniter/uniter.go:265: if err == nil { On 2013/08/12 09:25:50, dimitern ...
10 years, 8 months ago (2013-08-12 09:45:00 UTC) #12
jameinel
10 years, 8 months ago (2013-08-12 13:41:13 UTC) #13
Message was sent while issue was closed.
https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uni...
File state/apiserver/uniter/uniter.go (right):

https://codereview.appspot.com/12698043/diff/17001/state/apiserver/uniter/uni...
state/apiserver/uniter/uniter.go:265: if err == nil {
On 2013/08/12 09:45:01, rog wrote:
> On 2013/08/12 09:25:50, dimitern wrote:
> > On 2013/08/12 09:12:52, rog wrote:
> > > 
> > > Why are we ignoring the non-nil error here?
> > > 
> > > Endless repetition of this same code template
> > > does not make me happy.
> > 
> > Because there's no error to report here - we just return an empty string.
> 
> What if there's a network error trying to fetch the
> unit from the database? I don't think we want to
> return as if the unit has no subordinates in that case.

Aren't we missing the line:
results.Results[i].Error = common.ServerError(err)

At least for the other API calls we support individual error statements for each
entity we are asking about. (see line 190 above)
Sign in to reply to this message.

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