← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:fix-launchpad-codehosting-config-changed-handler-when_any-instead-of-when into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:fix-launchpad-codehosting-config-changed-handler-when_any-instead-of-when into launchpad:master.

Commit message:
charm/launchpad-codehosting: Use the when_any decorator for config.changed.<option>

This should fix the bug and allow the handler to run when any of the
options are changed, instead of when all of them are changed.



Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/461014
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:fix-launchpad-codehosting-config-changed-handler-when_any-instead-of-when into launchpad:master.
diff --git a/charm/launchpad-codehosting/reactive/launchpad-codehosting.py b/charm/launchpad-codehosting/reactive/launchpad-codehosting.py
index f8cd61f..073480b 100644
--- a/charm/launchpad-codehosting/reactive/launchpad-codehosting.py
+++ b/charm/launchpad-codehosting/reactive/launchpad-codehosting.py
@@ -21,6 +21,7 @@ from charms.reactive import (
     set_flag,
     set_state,
     when,
+    when_any,
     when_not,
     when_not_all,
 )
@@ -429,7 +430,7 @@ def configure_frontend_loadbalancer():
     set_state("launchpad-codehosting.frontend-loadbalancer.configured")
 
 
-@when(
+@when_any(
     "config.changed.haproxy_service_options_http",
     "config.changed.haproxy_service_options_https",
     "config.changed.haproxy_service_options_ssh",
@@ -488,7 +489,7 @@ def configure_loadbalancer():
     set_state("launchpad-codehosting.loadbalancer.configured")
 
 
-@when(
+@when_any(
     "config.changed.haproxy_service_options_internal_branch_by_id",
     "config.changed.haproxy_server_options",
     "config.changed.port_bzr_internal",