Fix model representation for bundle deployments. #8228

Merged
merged 1 commit into from Jan 3, 2018

Conversation

Projects
None yet
3 participants
Owner

howbazaar commented Dec 15, 2017

If there was a subordinate application that wasn't related to anything, the client would try to get application constraints for it, and error out.

QA steps

Deploy a subordinate application to a model.
Use --dry-run on any bundle deploy.

Bug reference

https://bugs.launchpad.net/juju/+bug/1736592

applications[name] = application
annotationTags = append(annotationTags, names.NewApplicationTag(name).String())
appNames = append(appNames, name)
- if len(appStatus.SubordinateTo) == 0 {
+ if len(appStatus.Units) > 0 {
@wallyworld

wallyworld Dec 15, 2017

Owner

Reading the code, it looks like doing this will prevent any constraints associated with the app from being processed. Not sure that's a good thing.

@howbazaar

howbazaar Dec 15, 2017

Owner

That isn't the case here. This is only building the memory representation of the model as it exists for working out what commands to run. If the app is specified in the bundle and has constraints, the worst that will happen is that it tries to set the constraints to what they are already.

Owner

howbazaar commented Dec 15, 2017

$$merge$$

Contributor

jujubot commented Dec 15, 2017

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

Contributor

jujubot commented Dec 15, 2017

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

Owner

howbazaar commented Jan 3, 2018

$$try-again$$

Contributor

jujubot commented Jan 3, 2018

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

@jujubot jujubot merged commit 50f6719 into juju:2.3 Jan 3, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@howbazaar howbazaar deleted the howbazaar:2.3-bundle-subordinates branch Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment