pub enum ApplyError {
Postgres(Error),
PlanIo(PlanIoError),
Catalog(CatalogError),
LockHeld,
TargetIdentityMismatch {
plan: String,
live: String,
},
DriftDetected(usize),
UnapprovedIntents {
count: usize,
details: Vec<(u32, String, String)>,
},
StepFailed {
step_no: u32,
group_no: u32,
error: String,
},
AbortedAfterStep {
step_no: u32,
},
LintWaiverMissing {
count: usize,
details: Vec<(String, String)>,
},
MissingEnvVar(String, u32),
Internal(String),
}Expand description
Errors raised by apply and its sub-stages.
Variants§
Postgres(Error)
tokio_postgres reported an error.
PlanIo(PlanIoError)
Reading the plan directory failed.
Catalog(CatalogError)
Catalog read or assemble failed during preflight.
LockHeld
The advisory lock is already held by another session.
TargetIdentityMismatch
The live target’s identity hash does not match the plan’s.
DriftDetected(usize)
The live catalog has drifted from the plan’s target_snapshot since
planning. The list of changes is rendered for the user.
UnapprovedIntents
One or more destructive intents were not approved.
Fields
StepFailed
A single step failed; the executor rolled back the enclosing group (if transactional) or stopped (if not).
Fields
AbortedAfterStep
The executor aborted cleanly after a step because the caller passed
ApplyOverrides::abort_after_step. Used by the testkit’s chaos
harness to validate the re-plan-and-resume recovery path.
LintWaiverMissing
One or more LintAtPlan findings lack a matching [[lint_waiver]] in
intent.toml. The plan cannot be applied until waivers are added or the
source is corrected.
Fields
MissingEnvVar(String, u32)
A plan step’s SQL referenced an env var that wasn’t set.
Internal(String)
An internal invariant was violated or an unexpected value was encountered.
Used for failures that are not Postgres errors (e.g., parsing a value returned from Postgres that should always be valid, but is not).
Trait Implementations§
Source§impl Debug for ApplyError
impl Debug for ApplyError
Source§impl Display for ApplyError
impl Display for ApplyError
Source§impl Error for ApplyError
impl Error for ApplyError
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 From<CatalogError> for ApplyError
impl From<CatalogError> for ApplyError
Source§fn from(source: CatalogError) -> Self
fn from(source: CatalogError) -> Self
Source§impl From<Error> for ApplyError
impl From<Error> for ApplyError
Source§impl From<PlanIoError> for ApplyError
impl From<PlanIoError> for ApplyError
Source§fn from(source: PlanIoError) -> Self
fn from(source: PlanIoError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ApplyError
impl !UnwindSafe for ApplyError
impl Freeze for ApplyError
impl Send for ApplyError
impl Sync for ApplyError
impl Unpin for ApplyError
impl UnsafeUnpin for ApplyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request