pub enum MutationValidationError {
Show 33 variants
SequenceOverflow,
NonMonotonicSequence {
expected: u64,
provided: u64,
},
UnknownRun {
run_id: RunId,
},
UnknownTask {
task_id: TaskId,
},
TaskAlreadyExists {
task_id: TaskId,
},
TaskAlreadyCanceled {
task_id: TaskId,
},
EngineAlreadyPaused,
EngineNotPaused,
RunAlreadyExists {
run_id: RunId,
},
RunCreateRequiresScheduled {
run_id: RunId,
state: RunState,
},
PreviousStateMismatch {
run_id: RunId,
expected: RunState,
actual: RunState,
},
InvalidTransition {
run_id: RunId,
from: RunState,
to: RunState,
},
AttemptStartUnknownRun {
run_id: RunId,
},
AttemptStartRequiresRunning {
run_id: RunId,
state: RunState,
},
AttemptStartAlreadyActive {
run_id: RunId,
active_attempt_id: AttemptId,
},
AttemptFinishUnknownRun {
run_id: RunId,
},
AttemptFinishRequiresRunning {
run_id: RunId,
state: RunState,
},
AttemptFinishMissingActive {
run_id: RunId,
},
AttemptFinishAttemptMismatch {
run_id: RunId,
expected_attempt_id: AttemptId,
provided_attempt_id: AttemptId,
},
LeaseUnknownRun {
run_id: RunId,
event: LeaseValidationEvent,
},
LeaseInvalidRunState {
run_id: RunId,
event: LeaseValidationEvent,
state: RunState,
},
LeaseAlreadyActive {
run_id: RunId,
},
LeaseMissingActive {
run_id: RunId,
event: LeaseValidationEvent,
},
LeaseOwnerMismatch {
run_id: RunId,
event: LeaseValidationEvent,
},
LeaseExpiryMismatch {
run_id: RunId,
event: LeaseValidationEvent,
expected_expiry: u64,
provided_expiry: u64,
},
LeaseHeartbeatExpiryRegression {
run_id: RunId,
previous_expiry: u64,
proposed_expiry: u64,
},
EmptyDependencyList {
task_id: TaskId,
},
RunSuspendRequiresRunning {
run_id: RunId,
state: RunState,
},
RunResumeRequiresSuspended {
run_id: RunId,
state: RunState,
},
BudgetNotAllocated {
task_id: TaskId,
dimension: BudgetDimension,
},
SubscriptionAlreadyExists {
subscription_id: SubscriptionId,
},
UnknownSubscription {
subscription_id: SubscriptionId,
},
SubscriptionAlreadyCanceled {
subscription_id: SubscriptionId,
},
}Expand description
Typed validation failures from the authority validation stage.
Variants§
SequenceOverflow
Projection sequence could not be advanced because it overflowed u64.
NonMonotonicSequence
Command sequence is stale or otherwise non-monotonic.
UnknownRun
Run targeted by the command does not exist in projection state.
UnknownTask
Task targeted by the command does not exist in projection state.
TaskAlreadyExists
Task creation rejected because task already exists.
TaskAlreadyCanceled
Task cancellation rejected because task is already canceled.
EngineAlreadyPaused
Engine pause command rejected because engine is already paused.
EngineNotPaused
Engine resume command rejected because engine is not paused.
RunAlreadyExists
Run creation rejected because run already exists.
RunCreateRequiresScheduled
Run creation requires Scheduled initial state.
PreviousStateMismatch
Command expected previous state does not match observed projection state.
Fields
InvalidTransition
Command requested an invalid lifecycle transition.
Fields
AttemptStartUnknownRun
Attempt-start command references a run that is unknown in projection state.
AttemptStartRequiresRunning
Attempt-start command requires the run to be in Running.
AttemptStartAlreadyActive
Attempt-start command rejected because the run already has an active attempt.
Fields
AttemptFinishUnknownRun
Attempt-finish command references a run that is unknown in projection state.
AttemptFinishRequiresRunning
Attempt-finish command requires the run to be in Running.
AttemptFinishMissingActive
Attempt-finish command requires an active attempt to exist.
AttemptFinishAttemptMismatch
Attempt-finish command attempt ID does not match active projection attempt ID.
Fields
LeaseUnknownRun
Lease lifecycle command references a run that is unknown in projection state.
Fields
event: LeaseValidationEventLease lifecycle command kind.
LeaseInvalidRunState
Lease lifecycle command is invalid for the run’s observed lifecycle state.
Fields
event: LeaseValidationEventLease lifecycle command kind.
LeaseAlreadyActive
Lease-acquire command rejected because a lease is already active.
LeaseMissingActive
Lease lifecycle command requires active lease metadata but none exists.
Fields
event: LeaseValidationEventLease lifecycle command kind.
LeaseOwnerMismatch
Lease lifecycle command owner does not match active lease owner.
Fields
event: LeaseValidationEventLease lifecycle command kind.
LeaseExpiryMismatch
Lease close command expiry does not match active lease expiry.
Fields
event: LeaseValidationEventLease lifecycle command kind.
LeaseHeartbeatExpiryRegression
Lease heartbeat command attempted to regress lease expiry.
Fields
EmptyDependencyList
Dependency declaration command contains an empty depends_on list.
RunSuspendRequiresRunning
Run suspend command rejected because the run is not in Running state.
RunResumeRequiresSuspended
Run resume command rejected because the run is not in Suspended state.
BudgetNotAllocated
Budget replenish command rejected because no allocation exists.
Fields
dimension: BudgetDimensionBudget dimension that has no allocation.
SubscriptionAlreadyExists
Subscription create command rejected because the subscription already exists.
Fields
subscription_id: SubscriptionIdExisting subscription identifier.
UnknownSubscription
Subscription lifecycle command references a subscription that is unknown.
Fields
subscription_id: SubscriptionIdMissing subscription identifier.
SubscriptionAlreadyCanceled
Subscription cancel command rejected because the subscription is already canceled.
Fields
subscription_id: SubscriptionIdAlready canceled subscription identifier.
Trait Implementations§
Source§impl Clone for MutationValidationError
impl Clone for MutationValidationError
Source§fn clone(&self) -> MutationValidationError
fn clone(&self) -> MutationValidationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more