diff --git a/ofborg/src/commitstatus.rs b/ofborg/src/commitstatus.rs index fb56db0..d12b5c3 100644 --- a/ofborg/src/commitstatus.rs +++ b/ofborg/src/commitstatus.rs @@ -75,15 +75,6 @@ pub enum CommitStatusError { Error(hubcaps::Error), } -impl CommitStatusError { - pub fn is_internal_error(&self) -> bool { - match self { - CommitStatusError::MissingSHA(_) => false, - CommitStatusError::Error(_) => true, - } - } -} - impl From for CommitStatusError { fn from(e: hubcaps::Error) -> CommitStatusError { use hyper::status::StatusCode; diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index e0d6c6a..965ad55 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -226,13 +226,15 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { self.actions().skip(&self.job) } - Err(Err(cswerr)) if !cswerr.is_internal_error() => { - error!("Ignorable error writing commit status: {:?}", cswerr); - + Err(Err(CommitStatusError::MissingSHA(e))) => { + error!( + "Failed writing commit status: commit sha was force-pushed away: {:?}", + e + ); self.actions().skip(&self.job) } - Err(Err(cswerr)) => { + Err(Err(CommitStatusError::Error(cswerr))) => { error!( "Internal error writing commit status: {:?}, marking internal error", cswerr