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

Issue 12347043: cmd/set: flag to set default value (Closed)

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

Description

cmd/set: flag to set default value This is the first of two CL for issue lp:1194945. Goal is a behavior change in setting an option to its default value. which is today done by calling juju set <svc> option= and with this CL by juju set <svc> --default option This allows to do another change in a second CL where the first way of executing the set command will set a string option to an empty string. This may brake compatibility, so a query is sent to the mailing list. https://code.launchpad.net/~themue/juju-core/036-set-default/+merge/178279 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/set: flag to set default value #

Total comments: 12

Patch Set 3 : cmd/set: flag to set default value #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -10 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/config_test.go View 1 2 2 chunks +56 lines, -3 lines 2 comments Download
M cmd/juju/set.go View 1 2 3 chunks +38 lines, -7 lines 1 comment Download

Messages

Total messages: 6
mue
Please take a look.
10 years, 9 months ago (2013-08-02 12:12:32 UTC) #1
mue
Please take a look.
10 years, 9 months ago (2013-08-02 12:18:00 UTC) #2
dimitern
A few thoughts https://codereview.appspot.com/12347043/diff/4001/cmd/juju/config_test.go File cmd/juju/config_test.go (right): https://codereview.appspot.com/12347043/diff/4001/cmd/juju/config_test.go#newcode133 cmd/juju/config_test.go:133: about: "set to default value nil ...
10 years, 9 months ago (2013-08-02 15:53:54 UTC) #3
mue
Please take a look. https://codereview.appspot.com/12347043/diff/4001/cmd/juju/config_test.go File cmd/juju/config_test.go (right): https://codereview.appspot.com/12347043/diff/4001/cmd/juju/config_test.go#newcode133 cmd/juju/config_test.go:133: about: "set to default value ...
10 years, 9 months ago (2013-08-02 17:23:46 UTC) #4
dimitern
LGTM, thank you! https://codereview.appspot.com/12347043/diff/9001/cmd/juju/config_test.go File cmd/juju/config_test.go (right): https://codereview.appspot.com/12347043/diff/9001/cmd/juju/config_test.go#newcode145 cmd/juju/config_test.go:145: err: "error: cannot mix default and ...
10 years, 9 months ago (2013-08-02 17:28:11 UTC) #5
jameinel
10 years, 8 months ago (2013-08-08 16:56:35 UTC) #6
The fact that '--default' changes how we parse the rest of the arguments makes
me wonder if we would be happier with a "juju reset foo bar baz" command or
"juju unset foo bar baz".

However the code is generally fine, and if it has been discussed, I'm not really
trying to paint the bike shed.

I'd like to see that we handle mixed args (you already handle the --default
foo=bar case, so checking the --default --config x case is sane would be nice.)

LGTM

https://codereview.appspot.com/12347043/diff/9001/cmd/juju/config_test.go
File cmd/juju/config_test.go (left):

https://codereview.appspot.com/12347043/diff/9001/cmd/juju/config_test.go#old...
cmd/juju/config_test.go:123: }, {
It feels like we are missing a test about what happens if you pass both
"--default" and "--config".

I think the answer is that we see it and consider the request invalid. I'd like
to be explicit about it, though.
Sign in to reply to this message.

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