Skip to content

Commit

Permalink
build: send Ack if HEAD failed to fetch
Browse files Browse the repository at this point in the history
Nothing we can do.
  • Loading branch information
cole-h committed Jan 26, 2024
1 parent f9c1379 commit 80ef583
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ofborg/src/tasks/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ impl<'a, 'b> JobActions<'a, 'b> {
self.snippet_log.clone().into()
}

pub fn pr_head_missing(&mut self) {
self.tell(worker::Action::Ack);
}

pub fn commit_missing(&mut self) {
self.tell(worker::Action::Ack);
}
Expand Down Expand Up @@ -311,7 +315,12 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
};

let refpath = co.checkout_origin_ref(target_branch.as_ref()).unwrap();
co.fetch_pr(job.pr.number).unwrap();

if co.fetch_pr(job.pr.number).is_err() {
info!("Failed to fetch {}", job.pr.number);
actions.pr_head_missing();
return;
}

if !co.commit_exists(job.pr.head_sha.as_ref()) {
info!("Commit {} doesn't exist", job.pr.head_sha);
Expand Down

0 comments on commit 80ef583

Please sign in to comment.