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

Issue 6541045: add Initialize (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by dave
Modified:
11 years, 7 months ago
Reviewers:
mp+125500
Visibility:
Public.

Description

add Initialize Prior to mstate, state.Initialize would accept a nil argument for the initial config, as this is non sensical this change makes this field manditory by changing it's type from map to *config.Config thereby enforcing a config which is at least valid to be present in the state. Additionally, calling state.Initialize twice will not result the environment configuration being overwritten. https://code.launchpad.net/~dave-cheney/juju-core/110-state-initialize/+merge/125500 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add Initialize #

Total comments: 1

Patch Set 3 : state: add Initialize #

Total comments: 1

Patch Set 4 : add Initialize #

Patch Set 5 : add Initialize #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -1 line) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/conn_test.go View 2 chunks +5 lines, -1 line 0 comments Download
M state/open.go View 1 2 3 4 2 chunks +24 lines, -0 lines 0 comments Download
M state/state_test.go View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 7
dave_cheney.net
Please take a look.
11 years, 7 months ago (2012-09-20 14:59:30 UTC) #1
dave_cheney.net
Please take a look.
11 years, 7 months ago (2012-09-20 15:01:59 UTC) #2
niemeyer
Neat. One minor: https://codereview.appspot.com/6541045/diff/3001/state/open.go File state/open.go (right): https://codereview.appspot.com/6541045/diff/3001/state/open.go#newcode65 state/open.go:65: log.Printf("state: initializing state") "storing no-secrets environment ...
11 years, 7 months ago (2012-09-20 15:25:55 UTC) #3
dave_cheney.net
Please take a look.
11 years, 7 months ago (2012-09-20 15:34:14 UTC) #4
niemeyer
LGTM
11 years, 7 months ago (2012-09-20 15:36:59 UTC) #5
aram
LGTM https://codereview.appspot.com/6541045/diff/3002/state/open.go File state/open.go (right): https://codereview.appspot.com/6541045/diff/3002/state/open.go#newcode66 state/open.go:66: // state has already been initalised. If this ...
11 years, 7 months ago (2012-09-20 15:37:46 UTC) #6
dave_cheney.net
11 years, 7 months ago (2012-09-20 15:43:05 UTC) #7
*** Submitted:

add Initialize

Prior to mstate, state.Initialize would accept a nil argument for the initial
config, as this is non sensical this change makes this field manditory by
changing it's type from map to *config.Config thereby enforcing a config which
is at least valid to be present in the state.

Additionally, calling state.Initialize twice will not result the environment
configuration being overwritten.

R=niemeyer, aram
CC=
https://codereview.appspot.com/6541045
Sign in to reply to this message.

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