pub enum Verdict {
Passed,
Failed {
exit_code: Option<i32>,
},
Errored {
provider: String,
detail: String,
},
TimedOut,
}Expand description
What an executor found. Four cases, because the queue’s response to each of them differs.
Variants§
Passed
The command ran and exited zero.
Failed
The command ran and exited nonzero. A statement about the change.
Errored
The provider could not produce a verdict at all. A statement about us, never about the change.
Fields
TimedOut
The job’s deadline elapsed. Also not a statement about the change: a job may time out because the executor was oversubscribed.
Implementations§
Source§impl Verdict
impl Verdict
Sourcepub fn evicts(&self) -> bool
pub fn evicts(&self) -> bool
Whether this verdict may evict the change from the train.
The whole reason Verdict is not a bool. Ejection is
permanent for the change and everything that transitively
depends on it, so it is reserved for the one case that is
actually a statement about the change’s content.
Sourcepub fn as_check_status(&self) -> CheckStatus
pub fn as_check_status(&self) -> CheckStatus
The durable form of this verdict (D49).
Total, and the mapping is the seam’s claim restated: a deadline
is a provider outcome, so TimedOut records as Errored rather
than as a check the commit failed. Nothing here produces
CheckStatus::Running – a Verdict is by definition an
executor that has finished answering.
Sourcepub fn is_conclusive(&self) -> bool
pub fn is_conclusive(&self) -> bool
Whether the executor answered the question it was asked.
Passed and Failed are answers. Errored and TimedOut are
the absence of one, and a train holding either must stall rather
than draw a conclusion.