Skip to content

Commit 2ca91d5

Browse files
committed
Lock queue if updating toolchain fails
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.
1 parent da1f362 commit 2ca91d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/docbuilder/queue.rs

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ impl DocBuilder {
8787
.map(|r| PackageKind::Registry(r.as_str()))
8888
.unwrap_or(PackageKind::CratesIo);
8989

90+
if let Err(err) = builder.update_toolchain() {
91+
log::error!("Updating toolchain failed, locking queue: {}", err);
92+
self.lock()?;
93+
return Err(err);
94+
}
95+
9096
builder.build_package(&krate.name, &krate.version, kind)?;
9197
Ok(())
9298
})?;

0 commit comments

Comments
 (0)