pub enum RunTaskError {
BuildKeyFailed {
source: BuildKeyError,
},
RestoreFailed {
source: RestoreError,
},
SpawnFailed {
source: ProcessError,
},
WaitFailed {
source: ProcessError,
},
CapturedStreamReadFailed {
stream: CapturedStream,
source: Error,
},
OutputPatternResolutionFailed {
root: PathBuf,
source: FsError,
},
OutputModeReadFailed {
path: PathBuf,
source: FsError,
},
OutputNotARegularFile {
path: PathBuf,
},
OutputDeclaredButNotProduced {
path: PathBuf,
},
StoreFailed {
source: StoreError,
},
MaterialisedOutputPathInvalid {
path: String,
source: ParseAbsoluteError,
},
}Expand description
Failure modes of run_task.
The variants enumerate only the executor-level failures: cases
where the lifecycle could not be carried through to a meaningful
CompletedRecord. Task-level failures (non-zero exit, signalled
exit) surface as [Ok(CompletedRecord { state: Failed, .. })]
per EXEC-009, not as an Err here.
Variants§
BuildKeyFailed
Cache-key derivation failed before lookup could be attempted.
Fields
source: BuildKeyErrorOriginating BuildKeyError.
RestoreFailed
haz_cache::Cache::restore failed during the cache-hit
path (CACHE-019). Cache misses are not errors per
CACHE-016, so this variant covers only the successful-
lookup-then-restore-failed shape.
Fields
source: RestoreErrorOriginating RestoreError.
SpawnFailed
The ProcessSpawner refused to start the child (executable
not found, permission denied, fork failure, etc.). Distinct
from EXEC-009’s failed state: that rule covers commands
that did run; this variant is for commands that never did.
Fields
source: ProcessErrorOriginating ProcessError.
WaitFailed
crate::process::Process::wait surfaced an I/O failure
while reaping the child. Rare on healthy hosts; usually indicates
that the child was reaped out from under us by a parent
signal handler or that the OS lost the descriptor.
Fields
source: ProcessErrorOriginating ProcessError.
CapturedStreamReadFailed
Reading the child’s stdout or stderr pipe to EOF failed during stream capture. The reader task that returned this error is the one whose stream did NOT reach EOF; the other stream’s capture may or may not have completed.
Fields
stream: CapturedStreamWhich of the two streams the failure came from, for
diagnostic precision (the underlying io::Error often
looks the same on both pipes).
OutputPatternResolutionFailed
Walking the filesystem to resolve a task’s outputs
patterns failed (output-side parallel of
BuildKeyError::InputPatternResolutionFailed). Distinct
from Self::OutputNotARegularFile and
Self::OutputDeclaredButNotProduced so the run summary
can tell “walk failed” from “the task did not honour its
declared outputs”.
Fields
OutputModeReadFailed
Reading the Unix permission bits of a matched output file
failed. The bytes themselves are read inside
haz_cache::Cache::store; this variant covers only the
mode lookup the executor performs to build
haz_cache::StoredOutput.
Fields
OutputNotARegularFile
A matched output path is not a regular file (a directory,
symlink to a non-file, socket, FIFO, etc.). The cache only
stores regular-file blobs (CACHE-013); non-file matches
cannot be ingested.
OutputDeclaredButNotProduced
A literal output pattern named a path the task did not
produce (the file does not exist on disk after a successful
run). Distinct from the input-side
BuildKeyError::InputPatternResolutionFailed because the
caller’s intent is the inverse: outputs are a contract the
task is supposed to honour; a missing literal output is a
task-level bug, not a filesystem accident.
StoreFailed
haz_cache::Cache::store failed while persisting a
successful run as a cache entry (CACHE-017).
Fields
source: StoreErrorOriginating StoreError.
MaterialisedOutputPathInvalid
A workspace-absolute path produced by the executor’s
output-resolution pass failed to parse as a
CanonicalPath.
Indicates an internal invariant violation: the resolver
builds each path string from already-validated
haz_domain::path::segment::PathSegments, so the parse
is expected to succeed unconditionally. The variant exists
so the failure surfaces typed rather than panicking; in
practice it should never fire.
Trait Implementations§
Source§impl Debug for RunTaskError
impl Debug for RunTaskError
Source§impl Display for RunTaskError
impl Display for RunTaskError
Source§impl Error for RunTaskError
impl Error for RunTaskError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCompat for RunTaskError
impl ErrorCompat for RunTaskError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more