Merge lp://staging/~jose/charms/precise/juju-gui/add-blank-defaults into lp://staging/charms/juju-gui

Proposed by José Antonio Rey
Status: Superseded
Proposed branch: lp://staging/~jose/charms/precise/juju-gui/add-blank-defaults
Merge into: lp://staging/charms/juju-gui
Diff against target: 26 lines (+3/-0)
1 file modified
config.yaml (+3/-0)
To merge this branch: bzr merge lp://staging/~jose/charms/precise/juju-gui/add-blank-defaults
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Needs Fixing
Review via email: mp+212885@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2014-04-24.

Commit message

Added blank defaults to the options that didn't have them

Description of the change

Currently, `charm proof` returns an error when there are options without defaults on the config.yaml file. I've added blank defaults for the options that didn't have them, so `charm proof` returns no errors now.

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

Hello Jose,

Thank you for working on this merge proposal! Your commitment to the communit is very impressive.

The current charm store policy does recommend that all configuration values have default values. However some older charms got in before this was a rule and consiquently some code actually depends on the value not being set. Since the hooks are python that is realized as a value of None in the code. When you default it to "" the configuration option is not None. We should be very careful with these kind of changes, to not break the code.

I followed all 4 configuration values through the code and believe that 3 of them are OK. But the login-help configuration value has the following code:

if login_help is None:

So when the login-help configuration option is "" it misses this block of code and the hard coded text is never set. I was able to see this text if you deploy the current juju-gui charm on the login page. If you deploy the juju-gui with your code the login text is empty and I do not believe this is what we want to happen.

Please leave the login-help configuration value without a default. I realize that charm proof will still report a warning here but this is a rare case where that is OK.

Thanks again for your work here! Keep being awesome Jose!

review: Needs Fixing
90. By José Antonio Rey

Removed blank default from login-help

Revision history for this message
José Antonio Rey (jose) wrote :

Hey, Matt!

Thanks so much for the comments, really appreciate it :)

I have removed the blank default from login-help. Let me know if there's anything else I should fix and I'll get right to it.

Revision history for this message
Francesco Banconi (frankban) wrote :

Hi José,

thanks a lot for contributing to the GUI charm!
FWIW I think it should be easy enough to change utils.write_gui_config so that it handles login_help as an empty string if you prefer that strategy.

That said, the GUI charm development is done using the development branch in lp:~juju-gui/charms/trusty/juju-gui/trunk (see http://bazaar.launchpad.net/~juju-gui-charmers/charms/precise/juju-gui/trunk/view/head:/HACKING.md). When we create a new release, that branch is then pushed to the precise and trusty release branches (lp:charms/juju-gui and lp:charms/trusty/juju-gui).

Could you please re-propose your changes against that branch?
Also, please run "make lint" and "make unittest" before creating the MP.

Thanks!

Revision history for this message
José Antonio Rey (jose) wrote :

Hi, Francesco!

I am going to make sure I do that later. Thanks for the heads up.

Unmerged revisions

90. By José Antonio Rey

Removed blank default from login-help

89. By José Antonio Rey

Added blank defaults for missing ones

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches