Skip to content

Commit

Permalink
Track how often target branches evaluate, to setup a potential alert …
Browse files Browse the repository at this point in the history
…for it.
  • Loading branch information
grahamc committed Feb 12, 2018
1 parent ce4e92b commit db3c5f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ofborg/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions ofborg/src/tasks/massrebuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit db3c5f1

Please sign in to comment.