Report failures to enumerate output paths
This commit is contained in:
parent
7a3b7d0fa0
commit
79fbe3fd3a
|
@ -52,31 +52,35 @@ impl OutPathDiff {
|
|||
return result;
|
||||
}
|
||||
|
||||
pub fn find_before(&mut self) {
|
||||
pub fn find_before(&mut self) -> bool {
|
||||
let x = self.run();
|
||||
match x {
|
||||
Ok(f) => {
|
||||
self.original = Some(self.parse(f))
|
||||
self.original = Some(self.parse(f));
|
||||
return true;
|
||||
}
|
||||
Err(_) => {
|
||||
info!("Failed to find Before list");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find_after(&mut self) {
|
||||
pub fn find_after(&mut self) -> bool {
|
||||
if self.original == None {
|
||||
debug!("Before is None, not bothering with After");
|
||||
return
|
||||
return false;
|
||||
}
|
||||
|
||||
let x = self.run();
|
||||
match x {
|
||||
Ok(f) => {
|
||||
self.current = Some(self.parse(f))
|
||||
self.current = Some(self.parse(f));
|
||||
return true;
|
||||
}
|
||||
Err(_) => {
|
||||
info!("Failed to find After list");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,13 @@ impl worker::SimpleWorker for MassRebuildWorker {
|
|||
hubcaps::statuses::State::Pending
|
||||
);
|
||||
|
||||
rebuildsniff.find_before();
|
||||
if !rebuildsniff.find_before() {
|
||||
overall_status.set_with_description(
|
||||
format!("Failed to enumerate outputs of {}", &target_branch).as_ref(),
|
||||
hubcaps::statuses::State::Failure
|
||||
);
|
||||
return self.actions().skip(&job);
|
||||
}
|
||||
|
||||
overall_status.set_with_description(
|
||||
"Fetching PR",
|
||||
|
@ -155,7 +161,13 @@ impl worker::SimpleWorker for MassRebuildWorker {
|
|||
hubcaps::statuses::State::Pending
|
||||
);
|
||||
|
||||
rebuildsniff.find_after();
|
||||
if !rebuildsniff.find_after() {
|
||||
overall_status.set_with_description(
|
||||
format!("Failed to enumerate outputs after merging to ", &target_branch).as_ref(),
|
||||
hubcaps::statuses::State::Failure
|
||||
);
|
||||
return self.actions().skip(&job);
|
||||
}
|
||||
|
||||
println!("Got path: {:?}, building", refpath);
|
||||
overall_status.set_with_description(
|
||||
|
|
Loading…
Reference in a new issue