application ConfigSettings() now populates any charm defaults #8179

Merged
merged 1 commit into from Dec 6, 2017

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Dec 6, 2017

Description of change

The application ConfigSettings() API now fills in any charm defaults.
The client application facade which provides "get config" functionality changes to compare any obtained values with the defaults so that the "source" attribute is correctly filled out.
There was a test which was filling in source as "user" even when the app value and charm default was the same so this has been fixed.

As a driveby, change the source of operator images to the jujusolutions repo.

QA steps

deploy a CAAS charm

axw approved these changes Dec 6, 2017

state/application.go
func (a *Application) ConfigSettings() (charm.Settings, error) {
settings, err := readSettings(a.st.db(), settingsC, a.settingsKey())
if err != nil {
return nil, err
}
- return settings.Map(), nil
+ chrm, _, err := a.Charm()
@axw

axw Dec 6, 2017

Member

can we refactor this and the Unit.ConfigSettings method to use a common function? it's all the same except the charm URL used to determine the settings key and fetch the charm

Owner

wallyworld commented Dec 6, 2017

$$merge$$

Contributor

jujubot commented Dec 6, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

Contributor

jujubot commented Dec 6, 2017

Build failed: Tests failed
build url: http://ci.jujucharms.com/job/github-merge-juju/641

Owner

wallyworld commented Dec 6, 2017

$$merge$$

Contributor

jujubot commented Dec 6, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit f864e40 into juju:develop Dec 6, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment