Automatically disable build triggers with successive failures or internal errors

We allow users to reenable them manually once disabled
This commit is contained in:
Joseph Schorr 2017-10-18 16:03:38 -04:00 committed by Joseph Schorr
parent c35eec0615
commit 93d79e777e
9 changed files with 166 additions and 11 deletions

View file

@ -519,3 +519,11 @@ class DefaultConfig(ImmutableConfig):
'engine': 'memcached',
'endpoint': ('127.0.0.1', 18080),
}
# Defines the number of successive failures of a build trigger's build before the trigger is
# automatically disabled.
SUCCESSIVE_TRIGGER_FAILURE_DISABLE_THRESHOLD = 100
# Defines the number of successive internal errors of a build trigger's build before the
# trigger is automatically disabled.
SUCCESSIVE_TRIGGER_INTERNAL_ERROR_DISABLE_THRESHOLD = 5