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

Issue 13912043: environs/configstore: add extra config info

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by rog
Modified:
10 years, 7 months ago
Reviewers:
mue, gz, mp+187551, fwereade
Visibility:
Public.

Description

environs/configstore: add extra config info https://code.launchpad.net/~rogpeppe/juju-core/420-configstore-extraconfig/+merge/187551 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : environs/configstore: add extra config info #

Total comments: 4

Patch Set 3 : environs/configstore: add extra config info #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -5 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M environs/configstore/disk.go View 1 2 4 chunks +25 lines, -5 lines 0 comments Download
M environs/configstore/disk_test.go View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M environs/configstore/interface.go View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M environs/configstore/interface_test.go View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
M environs/configstore/mem.go View 1 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 6
rog
Please take a look.
10 years, 7 months ago (2013-09-25 16:27:14 UTC) #1
rog
Please take a look.
10 years, 7 months ago (2013-09-25 16:33:50 UTC) #2
mue
LGTM, only a minor comment. https://codereview.appspot.com/13912043/diff/4001/environs/configstore/interface.go File environs/configstore/interface.go (right): https://codereview.appspot.com/13912043/diff/4001/environs/configstore/interface.go#newcode56 environs/configstore/interface.go:56: ExtraConfig() map[string]interface{} Would like ...
10 years, 7 months ago (2013-09-25 16:38:39 UTC) #3
gz
Seems okay, though I'm not super clear on the overall intention here. https://codereview.appspot.com/13912043/diff/4001/environs/configstore/disk.go File environs/configstore/disk.go ...
10 years, 7 months ago (2013-09-25 16:42:14 UTC) #4
fwereade
LGTM despite mildly suspicious question https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go File environs/configstore/disk.go (right): https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go#newcode112 environs/configstore/disk.go:112: return info.Config copy? https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go#newcode134 ...
10 years, 7 months ago (2013-09-25 17:15:09 UTC) #5
rog
10 years, 7 months ago (2013-09-26 09:11:03 UTC) #6
Please take a look.

https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go
File environs/configstore/disk.go (right):

https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go#n...
environs/configstore/disk.go:112: return info.Config
On 2013/09/25 17:15:09, fwereade wrote:
> copy?

My thought about this (and the other copy suggestion) is that
this is a mutable type, and it's the responsibility
of its user to avoid mutating it inappropriately.

https://codereview.appspot.com/13912043/diff/4001/environs/configstore/disk.go
File environs/configstore/disk.go (right):

https://codereview.appspot.com/13912043/diff/4001/environs/configstore/disk.g...
environs/configstore/disk.go:31: created      bool
On 2013/09/25 16:42:14, gz wrote:
> Not wild about this mechanism, it's not very clear what the flag actually
> indicates. That it's a fresh config, rather than a loaded one, right? Seems
like
> the same thing could be done by making Config nilable, but I guess that's not
> really any more elegant.

Well, Config *is* nilable, and it's quite likely that it'll be nil after reading
the info from an external source; whereas the created field cannot be affected
by unmarshalling.

I've added a comment.
Sign in to reply to this message.

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