Remove unused attributes from cmr model; refactor worker #7731

Merged
merged 1 commit into from Aug 11, 2017

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Aug 10, 2017

Description of change

For remote relation endpoints, we don't need to keep track of Limit or Scope, so remove those attributes.
Clean up the remote relations worker to remove unnecessary code.
Move various relation attributes to the right place so multiple remote relations are handled properly.

QA steps

Run up a cmr scenario.
Delete and re-create relations.
Add a second app and relate.
Ensure that all works.

@wallyworld wallyworld changed the title from Remove unused attribute from cmr model; refactor worker to Remove unused attributes from cmr model; refactor worker Aug 10, 2017

@wallyworld wallyworld requested a review from babbageclunk Aug 10, 2017

Nice - I cargo-culted those attrs in without really thinking about it.

@@ -107,7 +107,7 @@ func (c *Client) PublishRelationChange(change params.RemoteRelationChangeEvent)
}
// Make the api call the first time.
err := apiCall()
- if errors.IsNotFound(err) {
+ if err == nil || errors.IsNotFound(err) {
@babbageclunk

babbageclunk Aug 10, 2017

Member

Weird - was it always doing the second call before?

@wallyworld

wallyworld Aug 11, 2017

Owner

Yeah, was non-fatal; resulted in log noise.

Owner

wallyworld commented Aug 11, 2017

$$merge$$

Contributor

jujubot commented Aug 11, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 2430f68 into juju:develop Aug 11, 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