Track how often target branches evaluate, to setup a potential alert for it.
This commit is contained in:
parent
cc464aebfb
commit
a0af231c89
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue