Track how often target branches evaluate, to setup a potential alert for it.

This commit is contained in:
Graham Christensen 2018-02-12 08:36:25 -05:00
parent cc464aebfb
commit a0af231c89
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 8 additions and 0 deletions

View file

@ -248,6 +248,13 @@ fn events() -> Vec<MetricType> {
("branch", "String"),
]),
),
Metric::ticker(
"TargetBranchFailsEvaluation",
"Number of PR evaluations which failed because the target branch failed",
Some(vec![
("branch", "String"),
]),
),
Metric::ticker(
"JobDecodeSuccess",
"Number of successfully decoded jobs",

View file

@ -196,6 +196,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
file_to_str(&mut output),
));
self.events.notify(Event::TargetBranchFailsEvaluation(target_branch.clone()));
overall_status.set_with_description(
format!("Target branch {} doesn't evaluate!", &target_branch).as_ref(),
hubcaps::statuses::State::Failure,