log_message_collector: open log handle to ensure log file exists

This fixes the test in the previous commit.
This commit is contained in:
Cole Helbling 2023-03-27 11:38:53 -07:00
parent 64af23ec6c
commit e0ccca94f9

View file

@ -215,6 +215,11 @@ impl worker::SimpleWorker for LogMessageCollector {
MsgType::Start(ref start) => {
self.write_metadata(&job.from, start)
.expect("failed to write metadata");
// Make sure the log content exists by opening its handle.
// This (hopefully) prevents builds that produce no output (for any reason) from
// having their logs.nix.ci link complaining about a 404.
let _ = self.handle_for(&job.from).unwrap();
}
MsgType::Msg(ref message) => {
let handle = self.handle_for(&job.from).unwrap();