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

Issue 6256050: environ: add SetConfig (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by dfc
Modified:
11 years, 10 months ago
Reviewers:
mp+107357
Visibility:
Public.

Description

environ: add SetConfig Discussion: This proposal adds the ability for Environs to update their configuration. This facility replaces the previously proposed proxy Environ and provides more explicit control over when an Environs configuration is updated. After much discussion on IRC it is important to highlight that the values returned from Environ.{Public,}Storage are immutable with respect to any configuration change via Environ.SetConfig. To use the updated Environ configuration, callers must obtain a new reference to Storages. Additionally, in the dummy provider, the zookeeper value is still parsed as a configuration item but is not used. It wasn't used before either, so I've removed it from dummy.environConfig. https://code.launchpad.net/~dave-cheney/juju/go-environs-setconfig/+merge/107357 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : environ: add SetConfig #

Total comments: 6

Patch Set 3 : environ: add SetConfig #

Patch Set 4 : environ: add SetConfig #

Patch Set 5 : environ: add SetConfig #

Patch Set 6 : environ: add SetConfig #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -52 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M environs/dummy/environs.go View 8 chunks +26 lines, -12 lines 0 comments Download
M environs/ec2/config_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M environs/ec2/ec2.go View 1 2 3 4 5 15 chunks +86 lines, -27 lines 0 comments Download
M environs/ec2/export_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M environs/ec2/storage.go View 1 2 3 4 5 1 chunk +0 lines, -11 lines 0 comments Download
M environs/interface.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 13
rog
LGTM apart from PublicStorage. https://codereview.appspot.com/6256050/diff/1/environs/ec2/ec2.go File environs/ec2/ec2.go (right): https://codereview.appspot.com/6256050/diff/1/environs/ec2/ec2.go#newcode157 environs/ec2/ec2.go:157: return e.publicStorageUnlocked you need to ...
11 years, 11 months ago (2012-05-25 10:53:55 UTC) #1
dfc
Please take a look.
11 years, 11 months ago (2012-05-25 11:10:21 UTC) #2
dfc
On 2012/05/25 11:10:21, dfc wrote: > Please take a look. This proposal continues on from ...
11 years, 11 months ago (2012-05-25 11:11:20 UTC) #3
niemeyer
Oh, okay.. I got totally confused with it. It might be nice to mention the ...
11 years, 11 months ago (2012-05-25 19:23:37 UTC) #4
niemeyer
LGTM! This is great. Sorry for the pain, Dave. Just a few trivial details for ...
11 years, 11 months ago (2012-05-25 19:35:17 UTC) #5
niemeyer
https://codereview.appspot.com/6256050/diff/1/environs/ec2/ec2.go File environs/ec2/ec2.go (right): https://codereview.appspot.com/6256050/diff/1/environs/ec2/ec2.go#newcode157 environs/ec2/ec2.go:157: return e.publicStorageUnlocked On 2012/05/25 10:53:55, rog wrote: > you ...
11 years, 11 months ago (2012-05-25 19:47:45 UTC) #6
dfc
im really sorry i didn't indicate this more clearly, the old branch was to messed ...
11 years, 11 months ago (2012-05-26 00:12:20 UTC) #7
dfc
Please take a look. https://codereview.appspot.com/6256050/diff/4001/environs/ec2/ec2.go File environs/ec2/ec2.go (right): https://codereview.appspot.com/6256050/diff/4001/environs/ec2/ec2.go#newcode422 environs/ec2/ec2.go:422: // take an immutable reference ...
11 years, 11 months ago (2012-05-26 02:17:47 UTC) #8
niemeyer
https://codereview.appspot.com/6256050/diff/4001/environs/interface.go File environs/interface.go (right): https://codereview.appspot.com/6256050/diff/4001/environs/interface.go#newcode134 environs/interface.go:134: // The reference returned is immutable with respect to ...
11 years, 11 months ago (2012-05-26 05:27:03 UTC) #9
dfc
Please take a look. https://codereview.appspot.com/6256050/diff/4001/environs/interface.go File environs/interface.go (right): https://codereview.appspot.com/6256050/diff/4001/environs/interface.go#newcode134 environs/interface.go:134: // The reference returned is ...
11 years, 11 months ago (2012-05-26 05:56:02 UTC) #10
niemeyer
LGTM!
11 years, 10 months ago (2012-05-28 12:29:28 UTC) #11
dfc
Huzzah! On 28/05/2012, at 22:29, n13m3y3r@gmail.com wrote: > LGTM! > > https://codereview.appspot.com/6256050/
11 years, 10 months ago (2012-05-28 12:30:40 UTC) #12
dfc
11 years, 10 months ago (2012-05-28 21:23:17 UTC) #13
*** Submitted:

environ: add SetConfig

Discussion:

This proposal adds the ability for Environs to update their configuration.
This facility replaces the previously proposed proxy Environ and provides
more explicit control over when an Environs configuration is updated.

After much discussion on IRC it is important to highlight that the values 
returned from Environ.{Public,}Storage are immutable with respect to any
configuration change via Environ.SetConfig. To use the updated Environ 
configuration, callers must obtain a new reference to Storages.

Additionally, in the dummy provider, the zookeeper value is still parsed
as a configuration item but is not used. It wasn't used before either, so
I've removed it from dummy.environConfig.

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

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