Merge lp:~mardy/account-polld/no-account-watching into lp:~ubuntu-push-hackers/account-polld/trunk
Status: | Merged |
---|---|
Approved by: | Jonas G. Drange |
Approved revision: | 177 |
Merged at revision: | 174 |
Proposed branch: | lp:~mardy/account-polld/no-account-watching |
Merge into: | lp:~ubuntu-push-hackers/account-polld/trunk |
Diff against target: |
513 lines (+94/-150) 7 files modified
accounts/account-watcher.c (+53/-93) accounts/account-watcher.h (+5/-3) accounts/accounts.c (+2/-2) accounts/accounts.go (+12/-8) cmd/account-polld/account_service.go (+11/-13) cmd/account-polld/main.go (+10/-28) cmd/account-watcher-test/main.go (+1/-3) |
To merge this branch: | bzr merge lp:~mardy/account-polld/no-account-watching |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonas G. Drange (community) | Approve | ||
system-apps-ci-bot | continuous-integration | Approve | |
Review via email: mp+300847@code.launchpad.net |
Commit message
Don't watch accounts for changes: retrieve a new list at every poll
Watching for account changes makes the code more complicated than needed: we can simply query the list of enabled accounts at every Poll cycle, and check the differences with the previous list. This avoids the need to setup account watches and, more importantly, requires only once instance of AgAccountManager (compared to one instance for each service type).
Also, simplify the configuration of supported services: drop the usage of the "service type" concept, and rely on the service IDs only; this makes account-polld much easier to extend.
Description of the change
Don't watch accounts for changes: retrieve a new list at every poll
Watching for account changes makes the code more complicated than needed: we can simply query the list of enabled accounts at every Poll cycle, and check the differences with the previous list. This avoids the need to setup account watches and, more importantly, requires only once instance of AgAccountManager (compared to one instance for each service type).
Also, simplify the configuration of supported services: drop the usage of the "service type" concept, and rely on the service IDs only; this makes account-polld much easier to extend.
PASSED: Continuous integration, rev:177 /jenkins. canonical. com/system- apps/job/ lp-account- polld-ci/ 13/ /jenkins. canonical. com/system- apps/job/ build/1029 /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= vivid+overlay, testname= default/ 197 /jenkins. canonical. com/system- apps/job/ build-0- fetch/1029 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= vivid+overlay/ 926 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= xenial+ overlay/ 926 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= yakkety/ 926 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 920/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 920 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 920/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-account- polld-ci/ 13/rebuild
https:/