We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6a0cfb commit da50fddCopy full SHA for da50fdd
1 file changed
src/jobs/publish_job.rs
@@ -198,8 +198,13 @@ impl JobInstance for PublishJobInstance {
198
current_build.published_state,
199
¤t_build.published_state_reason,
200
);
201
- if !current_published_state.same_state_as(&PublishedState::Publishing) {
202
- // Something weird was happening, we expected this build to be in the publishing state
+ let is_restart_recovery = res.is_ok()
+ && current_published_state
203
+ == PublishedState::Failed("Server was restarted during publish".to_string());
204
+
205
+ if !current_published_state.same_state_as(&PublishedState::Publishing)
206
+ && !is_restart_recovery
207
+ {
208
error!("Unexpected publishing state {:?}", current_published_state);
209
return Err(DieselError::RollbackTransaction);
210
};
0 commit comments