Skip to content

Commit

Permalink
compiler: Log server id on failed distributed compile.
Browse files Browse the repository at this point in the history
When something goes slow because of too many distributed compiles failing, if
you start the client with logging you may see something like this:

```
> 4203: WARN 2020-01-16T22:54:36Z: sccache::compiler::compiler: [IPCMessageTypeName.o]: Could not perform distributed compile, falling back to local: could not run distributed compilation job: Error 500 (Headers={"server": "tiny-http (Rust)", "date": "Thu, 16 Jan 2020 22:54:36 GMT", "content-type": "application/json", "content-length": "147"}): {"description":"run build failed","cause":{"description":"failed to prepare overlay dirs","cause":{"description":"entity not found","cause":null}}}
```

That says that something is going wrong on the server, but doesn't tell you
which server.

This patch logs the server id so that you get some clue about where the failure
happens.
  • Loading branch information
emilio authored and chmanchester committed Jan 16, 2020
1 parent 1a3c0de commit 32e40bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ where
debug!("[{}]: Running job", compile_out_pretty3);
dist_client.do_run_job(job_alloc, dist_compile_cmd, dist_output_paths, inputs_packager)
.map(move |res| ((job_id, server_id), res))
.chain_err(|| "could not run distributed compilation job")
.chain_err(move || format!("could not run distributed compilation job on {:?}", server_id))
})
})
.and_then(move |((job_id, server_id), (jres, path_transformer))| {
Expand Down

0 comments on commit 32e40bb

Please sign in to comment.