Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(134)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 13912043: environs/configstore: add extra config info

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by rog
Modified:
12 years, 3 months ago
Reviewers:
mue , gz, mp+187551, fwereade
Visibility:
Public.
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 #

Created: 12 years, 3 months ago
Download [raw] [tar.bz2]
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
Total messages: 6
|
rog
Please take a look.
12 years, 3 months ago (2013年09月25日 16:27:14 UTC) #1
Please take a look.
Sign in to reply to this message.
rog
Please take a look.
12 years, 3 months ago (2013年09月25日 16:33:50 UTC) #2
Please take a look.
Sign in to reply to this message.
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 ...
12 years, 3 months ago (2013年09月25日 16:38:39 UTC) #3
LGTM, only a minor comment.
https://codereview.appspot.com/13912043/diff/4001/environs/configstore/interf...
File environs/configstore/interface.go (right):
https://codereview.appspot.com/13912043/diff/4001/environs/configstore/interf...
environs/configstore/interface.go:56: ExtraConfig() map[string]interface{}
Would like a 
type ExtraConfig map[string]interface{} 
and then changed signatures here and in SetExtraConfig() (and their
implementations).
https://codereview.appspot.com/13912043/diff/4001/environs/configstore/mem.go
File environs/configstore/mem.go (right):
https://codereview.appspot.com/13912043/diff/4001/environs/configstore/mem.go...
environs/configstore/mem.go:41: func NewMem() Storage {
;)
Sign in to reply to this message.
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 ...
12 years, 3 months ago (2013年09月25日 16:42:14 UTC) #4
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 (right):
https://codereview.appspot.com/13912043/diff/4001/environs/configstore/disk.g...
environs/configstore/disk.go:31: created bool
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.
Sign in to reply to this message.
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 ...
12 years, 3 months ago (2013年09月25日 17:15:09 UTC) #5
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#n...
environs/configstore/disk.go:112: return info.Config
copy?
https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go#n...
environs/configstore/disk.go:134: panic("extra config set on environment info
that has not just been created")
Hmm. I think there are at least two places this makes sense.
1) on creation, containing only the fields necessary to bootstrap
2) on bootstrap, containing only the fields necessary to make contact with the
environ and complete bootstrap in the absence of valid state-servers
Are these really definitely the same things?
https://codereview.appspot.com/13912043/diff/1/environs/configstore/disk.go#n...
environs/configstore/disk.go:136: info.Config = attrs
copy?
Sign in to reply to this message.
rog
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#newcode112 environs/configstore/disk.go:112: return info.Config On 2013年09月25日 17:15:09, ...
12 years, 3 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

AltStyle によって変換されたページ (->オリジナル) /