-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17122 from SimonRichardson/eventsource-multiw…
…atcher juju#17122 The multiwatcher was originally a notifywatcher, so it emitted changes for type struct{}. This isn't required, we could just generalize it for type T. This moves the multi-watcher from core watcher to event source. Eventually, everything in `core/watcher` will be replaced with `core/watcher/eventsource` (just not yet). All these places used a variation of the apiserver common multi-watcher or the core multiwatcher. By moving to the eventsource version, we're consistently the same throughout. ---- We need to decide if we coalesce events at the watcher level. I've currently left that out, but is simple enough to add it back. We already coalesce events at the database level, then doing additional coalescing at the watcher level seems overkill. Although I understand why it's in the current location. For example, if an implementations expect 2 change events then that could be baked into the code directly. By stating at least 1 will be received, implementations will likely be more robust (chaos monkey if you will). ## Checklist - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing ## QA steps This tests a lot of aspects of juju, so ensure a bootstrap works and keeping an eye out for the integration tests will be required. ```sh $ juju bootstrap lxd test $ juju add-model default $ juju deploy ubuntu ``` ## Links **Jira card:** JUJU-
- Loading branch information
Showing
28 changed files
with
378 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.