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

Issue 39790043: Fix deprecated config warnings (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by wallyworld
Modified:
10 years, 4 months ago
Reviewers:
mp+198330, jameinel, fwereade
Visibility:
Public.

Description

Fix deprecated config warnings Checks for deprecated config values were being done inside config.Validate(). However, this method is called at least 3 times when an environment is created, leading to duplicated warnings and incorrect information being shown. The deprecation checks are moved to Environs.Config(name) which is only called once when an environment is created. https://code.launchpad.net/~wallyworld/juju-core/refactor-deprecated-config-processing/+merge/198330 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -154 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/config.go View 1 chunk +27 lines, -0 lines 0 comments Download
M environs/config/config.go View 1 chunk +0 lines, -24 lines 0 comments Download
M environs/config/config_test.go View 4 chunks +3 lines, -90 lines 0 comments Download
M environs/config_test.go View 3 chunks +145 lines, -40 lines 0 comments Download
M environs/export_test.go View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5
wallyworld
Please take a look.
10 years, 4 months ago (2013-12-10 01:26:22 UTC) #1
fwereade
Not sure about this. I'll stay up tonight and talk when you get on, I ...
10 years, 4 months ago (2013-12-11 09:28:58 UTC) #2
fwereade
On 2013/12/11 09:28:58, fwereade wrote: > Not sure about this. I'll stay up tonight and ...
10 years, 4 months ago (2013-12-11 22:18:59 UTC) #3
jameinel
Its pretty clear this is just moving the code, so that part LGTM. Is there ...
10 years, 4 months ago (2013-12-12 06:32:30 UTC) #4
wallyworld
10 years, 4 months ago (2013-12-12 10:27:38 UTC) #5
On 2013/12/12 06:32:30, jameinel wrote:
> Its pretty clear this is just moving the code, so that part LGTM.
> 
> Is there a test we could have that would have caught that we were being overly
> verbose about being unhappy about a deprecated field?

There's a new test in this code which more or less did that -
TestDeprecationWarnings
I added an explicit gc.HasLen check to ensure there is only one log message.
Sign in to reply to this message.

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