Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
relation status watcher now a strings watcher, shared with watch relations #7783
Conversation
| @@ -384,11 +384,25 @@ func (api *CrossModelRelationsAPI) WatchRelationsStatus( | ||
| } | ||
| results.Results[i].RelationStatusWatcherId = api.resources.Register(w) | ||
| changesParams := make([]params.RelationStatusChange, len(changes)) | ||
| - for j, ch := range changes { | ||
| + for j, key := range changes { |
babbageclunk
Aug 24, 2017
Member
Any way you can share this code somehow with srvRelationStatusWatcher.Next?
|
$$merge$$ |
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
jujubot
merged commit 79a2e0e
into
juju:develop
Aug 24, 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
wallyworld commentedAug 24, 2017
Description of change
The state relation status watcher is changed to a strings watcher and the bespoke watcher removed. This then allows the 2 relations watchers to be consolidated to use the single shared state watcher:
application -> WatchRelations
relation -> WatchStatus
A whole bunch of code is deleted as a result.
Both of the above watchers now return the keys of any relation that has a life or status change. Infrastructure that uses the above has been tweaked accordingly. We also introduce status to the relation data model.
A followup PR will use the new watcher behaviour in the uniter to react to relation status changes.
QA steps
No visible change. Smoke test cmr and non-cmr deployments.