Rename: NixFailure -> ChildFailure, NixKilled -> ChildKilled

This commit is contained in:
Zhaofeng Li 2022-03-07 22:02:04 -08:00
parent 9c179b0db8
commit 108c135700
2 changed files with 7 additions and 7 deletions

View file

@ -19,11 +19,11 @@ pub enum ColmenaError {
#[snafu(display("Nix returned invalid response: {}", output))]
BadOutput { output: String },
#[snafu(display("Nix exited with error code: {}", exit_code))]
NixFailure { exit_code: i32 },
#[snafu(display("Child process exited with error code: {}", exit_code))]
ChildFailure { exit_code: i32 },
#[snafu(display("Nix was killed by signal {}", signal))]
NixKilled { signal: i32 },
#[snafu(display("Child process was killed by signal {}", signal))]
ChildKilled { signal: i32 },
#[snafu(display("This operation is not supported"))]
Unsupported,
@ -89,8 +89,8 @@ impl From<ValidationErrors> for ColmenaError {
impl From<ExitStatus> for ColmenaError {
fn from(status: ExitStatus) -> Self {
match status.code() {
Some(exit_code) => Self::NixFailure { exit_code },
None => Self::NixKilled { signal: status.signal().unwrap() },
Some(exit_code) => Self::ChildFailure { exit_code },
None => Self::ChildKilled { signal: status.signal().unwrap() },
}
}
}

View file

@ -41,7 +41,7 @@ impl ParallelismLimit {
/// evaluated at the same time. This can be a problem if you
/// are deploying to a large number of nodes at the same time,
/// where `nix-instantiate` may consume too much RAM and get
/// killed by the OS (`NixKilled` error).
/// killed by the OS (`ChildKilled` error).
///
/// Evaluating each node on its own is not an efficient solution,
/// with total CPU time and memory consumption vastly exceeding the