Skip to content

Commit

Permalink
Lock queue if updating toolchain fails
Browse files Browse the repository at this point in the history
Reduces the impact from failures like rust-lang#1305, rather than continuing to
build crates with the failing toolchain we will just stop building
crates until an admin has time to investigate the cause.
  • Loading branch information
Nemo157 committed Mar 6, 2021
1 parent da1f362 commit 2ca91d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/docbuilder/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ impl DocBuilder {
.map(|r| PackageKind::Registry(r.as_str()))
.unwrap_or(PackageKind::CratesIo);

if let Err(err) = builder.update_toolchain() {
log::error!("Updating toolchain failed, locking queue: {}", err);
self.lock()?;
return Err(err);
}

builder.build_package(&krate.name, &krate.version, kind)?;
Ok(())
})?;
Expand Down

0 comments on commit 2ca91d5

Please sign in to comment.