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

Issue 13522043: charm: allow empty string options

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by mue
Modified:
10 years, 7 months ago
Reviewers:
dimitern, axw1, mp+183853, fwereade, jameinel
Visibility:
Public.

Description

charm: allow empty string options The is the second CL for http://pad.lv/1194945, this time keeping the behavior of the API. So now if empty strings are passed as settings via Go it leads to empty string options or an error in case of other types. Passing empty strings via the API deletes them like before. https://code.launchpad.net/~themue/juju-core/042-empty-values/+merge/183853 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : charm: allow empty string options #

Total comments: 15

Patch Set 3 : charm: allow empty string options #

Total comments: 3

Patch Set 4 : charm: allow empty string options #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -42 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M charm/config.go View 2 chunks +0 lines, -5 lines 4 comments Download
M charm/config_test.go View 4 chunks +13 lines, -14 lines 0 comments Download
M state/apiserver/client/client.go View 1 2 3 3 chunks +37 lines, -2 lines 4 comments Download
M state/apiserver/client/client_test.go View 1 2 3 1 chunk +58 lines, -7 lines 0 comments Download
A state/apiserver/client/export_test.go View 1 2 3 1 chunk +8 lines, -0 lines 2 comments Download
M state/apiserver/client/get_test.go View 1 2 4 chunks +12 lines, -13 lines 0 comments Download
M state/service_test.go View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 9
mue
Please take a look.
10 years, 7 months ago (2013-09-04 11:23:34 UTC) #1
mue
Please take a look.
10 years, 7 months ago (2013-09-04 11:31:15 UTC) #2
fwereade
Looking solid, just a couple of comments https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go File state/apiserver/client/client.go (right): https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go#newcode261 state/apiserver/client/client.go:261: err = ...
10 years, 7 months ago (2013-09-04 15:48:08 UTC) #3
dimitern
A few comments. I also agree with William's as well. https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go File state/apiserver/client/client.go (right): https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go#newcode150 ...
10 years, 7 months ago (2013-09-05 07:18:46 UTC) #4
mue
Please take a look. https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go File state/apiserver/client/client.go (right): https://codereview.appspot.com/13522043/diff/4001/state/apiserver/client/client.go#newcode150 state/apiserver/client/client.go:150: // Split settings due to ...
10 years, 7 months ago (2013-09-05 11:32:25 UTC) #5
jameinel
I'd like to see some clearer tests about what is happening. (A test that clearly ...
10 years, 7 months ago (2013-09-10 08:33:24 UTC) #6
mue
Please take a look. https://codereview.appspot.com/13522043/diff/11001/state/apiserver/client/client.go File state/apiserver/client/client.go (right): https://codereview.appspot.com/13522043/diff/11001/state/apiserver/client/client.go#newcode410 state/apiserver/client/client.go:410: // unsetted the option. Now ...
10 years, 7 months ago (2013-09-11 08:17:58 UTC) #7
axw1
LGTM, just a couple of typos and stale comments. https://codereview.appspot.com/13522043/diff/16001/charm/config.go File charm/config.go (left): https://codereview.appspot.com/13522043/diff/16001/charm/config.go#oldcode45 charm/config.go:45: ...
10 years, 7 months ago (2013-09-11 08:37:42 UTC) #8
mue
10 years, 7 months ago (2013-09-11 16:29:09 UTC) #9
https://codereview.appspot.com/13522043/diff/16001/charm/config.go
File charm/config.go (left):

https://codereview.appspot.com/13522043/diff/16001/charm/config.go#oldcode45
charm/config.go:45: if checker := optionTypeCheckers[option.Type]; checker !=
nil {
On 2013/09/11 08:37:42, axw1 wrote:
> Comment above here (not seen in diff) needs to change.

Done.

https://codereview.appspot.com/13522043/diff/16001/charm/config.go#oldcode65
charm/config.go:65: // string values are returned as nil.
On 2013/09/11 08:37:42, axw1 wrote:
> Comment needs to change.

Done.

https://codereview.appspot.com/13522043/diff/16001/state/apiserver/client/cli...
File state/apiserver/client/client.go (right):

https://codereview.appspot.com/13522043/diff/16001/state/apiserver/client/cli...
state/apiserver/client/client.go:248: // Parse config in a compatile way (see
function comment).
On 2013/09/11 08:37:42, axw1 wrote:
> typo - s/compatile/compatible/

Done.

https://codereview.appspot.com/13522043/diff/16001/state/apiserver/client/cli...
state/apiserver/client/client.go:408: // campatible with the behavior before
this CL based on the issue
On 2013/09/11 08:37:42, axw1 wrote:
> s/campatible/compatible/

Done.

https://codereview.appspot.com/13522043/diff/16001/state/apiserver/client/exp...
File state/apiserver/client/export_test.go (right):

https://codereview.appspot.com/13522043/diff/16001/state/apiserver/client/exp...
state/apiserver/client/export_test.go:6: import ()
On 2013/09/11 08:37:42, axw1 wrote:
> why is this here?

Done.
Sign in to reply to this message.

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