pub enum RevisionLifecycleError {
NotFound {
env_id: EnvId,
revision_id: RevisionId,
},
InvalidTransition {
from: RevisionLifecycle,
to: RevisionLifecycle,
},
Conflict {
revision_id: RevisionId,
actual: RevisionLifecycle,
expected_starts: Vec<RevisionLifecycle>,
},
EmptyChain,
ActiveTrafficReference {
revision_id: RevisionId,
splits: Vec<ActiveSplitRef>,
},
HealthGateFailed {
revision_id: RevisionId,
failed_checks: Vec<HealthCheckId>,
message: String,
},
DuplicateRevision {
env_id: EnvId,
revision_id: RevisionId,
},
DeploymentNotFound {
env_id: EnvId,
deployment_id: DeploymentId,
},
}Expand description
Failures produced by the pure revision-lifecycle transforms. The pure
twin of greentic-deployer’s environment::lifecycle::LifecycleError
(which adds a storage variant on top); each backend maps these onto its
own error vocabulary — LocalFsStore → LifecycleError/StoreError,
the operator-store-server → crate::remote::RemoteStoreError.
Variants§
NotFound
The targeted revision was not present in the environment.
InvalidTransition
The spec matrix rejected an edge inside the requested chain. This is a programming error in the caller, not a runtime conflict — every chain passed in by the verb functions below is hand-curated.
Conflict
The revision was loaded in a state that does not start any edge in
the accepted chain (or, for warm, no longer carries the lifecycle
the caller observed at gate-evaluation time). actual carries the
lifecycle the transform found; expected_starts lists the states it
would have accepted.
EmptyChain
The caller passed an empty accepted_chain. Internal-API misuse.
ActiveTrafficReference
The archive path (prune_from_splits = true) was invoked against a
revision still referenced by one or more live traffic splits.
Callers must rebalance traffic via gtc op traffic set before
retrying.
HealthGateFailed
The warm/ready health gate rejected the revision after the chain
reached its final state. The transform has flipped the revision’s
lifecycle to Failed IN the borrowed environment — per the module’s
persist rule the caller MUST persist before surfacing this error.
DuplicateRevision
A revision with this id already exists in the environment. The
stage verb’s revision_id is caller-supplied (the bundle staging
step names its rev_dir after the ULID before the verb runs), so a
retry of a lost stage response replays the same id — appending a
second copy would corrupt every revision_id lookup. Backends map
this to their create-on-existing conflict (HTTP 409).
DeploymentNotFound
The deployment the verb references does not exist in the environment.
Implementations§
Source§impl RevisionLifecycleError
impl RevisionLifecycleError
Sourcepub fn env_mutated(&self) -> bool
pub fn env_mutated(&self) -> bool
Whether the borrowed environment was mutated before this error was
returned (and therefore MUST be persisted by the caller). True only
for Self::HealthGateFailed — every other error leaves the
environment in a discard-only state.
Trait Implementations§
Source§impl Clone for RevisionLifecycleError
impl Clone for RevisionLifecycleError
Source§fn clone(&self) -> RevisionLifecycleError
fn clone(&self) -> RevisionLifecycleError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RevisionLifecycleError
impl Debug for RevisionLifecycleError
Source§impl Display for RevisionLifecycleError
impl Display for RevisionLifecycleError
impl Eq for RevisionLifecycleError
Source§impl Error for RevisionLifecycleError
impl Error for RevisionLifecycleError
1.30.0 · 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 PartialEq for RevisionLifecycleError
impl PartialEq for RevisionLifecycleError
Source§fn eq(&self, other: &RevisionLifecycleError) -> bool
fn eq(&self, other: &RevisionLifecycleError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RevisionLifecycleError
Auto Trait Implementations§
impl Freeze for RevisionLifecycleError
impl RefUnwindSafe for RevisionLifecycleError
impl Send for RevisionLifecycleError
impl Sync for RevisionLifecycleError
impl Unpin for RevisionLifecycleError
impl UnsafeUnpin for RevisionLifecycleError
impl UnwindSafe for RevisionLifecycleError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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