Skip to main content

RunTaskError

Enum RunTaskError 

Source
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: BuildKeyError

Originating 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: RestoreError

Originating 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: ProcessError

Originating 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: ProcessError

Originating 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: CapturedStream

Which of the two streams the failure came from, for diagnostic precision (the underlying io::Error often looks the same on both pipes).

§source: Error

Underlying I/O error.

§

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

§root: PathBuf

The absolute path being walked when the failure occurred.

§source: FsError

Underlying filesystem error.

§

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

§path: PathBuf

The output file whose mode could not be read.

§source: FsError

Underlying filesystem error.

§

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.

Fields

§path: PathBuf

Absolute path of the offending entry.

§

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.

Fields

§path: PathBuf

Absolute path of the declared-but-missing output.

§

StoreFailed

haz_cache::Cache::store failed while persisting a successful run as a cache entry (CACHE-017).

Fields

§source: StoreError

Originating 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.

Fields

§path: String

The offending path string.

§source: ParseAbsoluteError

Originating parse error.

Trait Implementations§

Source§

impl Debug for RunTaskError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RunTaskError

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RunTaskError
where Self: Debug + Display,

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for RunTaskError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a Backtrace that may be printed.
Source§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V