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
(295)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 62400043: Fix lp:1168744 validate config

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by waigani
Modified:
11 years, 10 months ago
Reviewers:
axw, fwereade, mp+205880
Visibility:
Public.
Fix lp:1168744 validate config Add new function to environs, ValidateConfig, which makes a new config by applying config args to oldConfig and validating via environ provider specific validator. https://code.launchpad.net/~waigani/juju-core/validate-environ-config/+merge/205880 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Fix lp:1168744 validate config #

Total comments: 8

Patch Set 3 : Fix lp:1168744 validate config #

Created: 11 years, 11 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -28 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/environment.go View 1 2 2 chunks +7 lines, -11 lines 0 comments Download
M cmd/juju/environment_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/config.go View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M state/apiserver/client/client.go View 1 2 1 chunk +4 lines, -15 lines 0 comments Download
M state/apiserver/keymanager/keymanager.go View 1 2 2 chunks +2 lines, -1 line 0 comments Download
Total messages: 6
|
waigani
Please take a look.
11 years, 11 months ago (2014年02月12日 21:09:58 UTC) #1
Please take a look.
Sign in to reply to this message.
waigani
Please take a look.
11 years, 11 months ago (2014年02月12日 22:55:30 UTC) #2
Please take a look.
Sign in to reply to this message.
axw
https://codereview.appspot.com/62400043/diff/10001/environs/config.go File environs/config.go (right): https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267 environs/config.go:267: func ValidateConfig(oldConfig *config.Config, args map[string]interface{}) (newProviderConfig *config.Config, err error) ...
11 years, 11 months ago (2014年02月13日 08:59:41 UTC) #3
https://codereview.appspot.com/62400043/diff/10001/environs/config.go
File environs/config.go (right):
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267
environs/config.go:267: func ValidateConfig(oldConfig *config.Config, args
map[string]interface{}) (newProviderConfig *config.Config, err error) {
This doesn't look quite right to me. I think it should just have the same
signature as EnvironProvider.Validate.
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode273
environs/config.go:273: env, err := New(oldConfig)
This is way overkill for getting a provider. Instead, just get the provider type
from the config and use environs.Provider().
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
File state/apiserver/client/client.go (right):
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
state/apiserver/client/client.go:787: //Make new config by applying config args
to oldConfig and validating via environ provider specific validator
I don't think this comment is worthwhile. It's just restating what
ValidateConfig says it does.
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
File state/apiserver/keymanager/keymanager.go (right):
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
state/apiserver/keymanager/keymanager.go:143: //Make new config by applying
config args to currentConfig and validating via environ provider specific
validator
ditto
Sign in to reply to this message.
fwereade
On 2014年02月13日 08:59:41, axw wrote: > https://codereview.appspot.com/62400043/diff/10001/environs/config.go > File environs/config.go (right): > > https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267 > ...
11 years, 11 months ago (2014年02月14日 09:32:41 UTC) #4
On 2014年02月13日 08:59:41, axw wrote:
> https://codereview.appspot.com/62400043/diff/10001/environs/config.go
> File environs/config.go (right):
> 
>
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267
> environs/config.go:267: func ValidateConfig(oldConfig *config.Config, args
> map[string]interface{}) (newProviderConfig *config.Config, err error) {
> This doesn't look quite right to me. I think it should just have the same
> signature as EnvironProvider.Validate.
> 
>
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode273
> environs/config.go:273: env, err := New(oldConfig)
> This is way overkill for getting a provider. Instead, just get the provider
type
> from the config and use environs.Provider().
> 
>
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
> File state/apiserver/client/client.go (right):
> 
>
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
> state/apiserver/client/client.go:787: //Make new config by applying config
args
> to oldConfig and validating via environ provider specific validator
> I don't think this comment is worthwhile. It's just restating what
> ValidateConfig says it does.
> 
>
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
> File state/apiserver/keymanager/keymanager.go (right):
> 
>
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
> state/apiserver/keymanager/keymanager.go:143: //Make new config by applying
> config args to currentConfig and validating via environ provider specific
> validator
> ditto
I don't think this is quite the right approach: it's fundamentally racy, and
that can't be fixed unless we do it inside state (well... we *could* have a
retry loop at the API level I guess? but I think that would suck a bit).
Can we chat about this live? Axw is doing some relevant work that would mesh
nicely, I think; I'll be online my sunday night/your monday morning to chat to
Tim.
Sign in to reply to this message.
waigani
Please take a look. https://codereview.appspot.com/62400043/diff/10001/environs/config.go File environs/config.go (right): https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267 environs/config.go:267: func ValidateConfig(oldConfig *config.Config, args map[string]interface{}) ...
11 years, 11 months ago (2014年02月15日 20:04:41 UTC) #5
Please take a look.
https://codereview.appspot.com/62400043/diff/10001/environs/config.go
File environs/config.go (right):
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode267
environs/config.go:267: func ValidateConfig(oldConfig *config.Config, args
map[string]interface{}) (newProviderConfig *config.Config, err error) {
On 2014年02月13日 08:59:42, axw wrote:
> This doesn't look quite right to me. I think it should just have the same
> signature as EnvironProvider.Validate.
Changed func name after discussing with Ian.
https://codereview.appspot.com/62400043/diff/10001/environs/config.go#newcode273
environs/config.go:273: env, err := New(oldConfig)
On 2014年02月13日 08:59:42, axw wrote:
> This is way overkill for getting a provider. Instead, just get the provider
type
> from the config and use environs.Provider().
Done.
Sign in to reply to this message.
waigani
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/client.go File state/apiserver/client/client.go (right): https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/client.go#newcode787 state/apiserver/client/client.go:787: //Make new config by applying config args to oldConfig ...
11 years, 11 months ago (2014年02月15日 20:34:27 UTC) #6
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
File state/apiserver/client/client.go (right):
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/client/cli...
state/apiserver/client/client.go:787: //Make new config by applying config args
to oldConfig and validating via environ provider specific validator
On 2014年02月13日 08:59:42, axw wrote:
> I don't think this comment is worthwhile. It's just restating what
> ValidateConfig says it does.
Done.
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
File state/apiserver/keymanager/keymanager.go (right):
https://codereview.appspot.com/62400043/diff/10001/state/apiserver/keymanager...
state/apiserver/keymanager/keymanager.go:143: //Make new config by applying
config args to currentConfig and validating via environ provider specific
validator
On 2014年02月13日 08:59:42, axw wrote:
> ditto
Done.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

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