pub enum TrafficSplitError {
DeploymentNotFound {
env_id: EnvId,
deployment_id: DeploymentId,
},
RevisionNotFound {
env_id: EnvId,
revision_id: RevisionId,
},
WrongDeployment {
revision_id: RevisionId,
actual: DeploymentId,
expected: DeploymentId,
},
IdempotencyKeyReused {
key: String,
deployment_id: DeploymentId,
},
AdmissionRevisionMissing {
env_id: EnvId,
revision_id: RevisionId,
},
NotReady {
revision_id: RevisionId,
lifecycle: RevisionLifecycle,
},
SnapshotEncode {
detail: String,
},
NoSplit {
env_id: EnvId,
deployment_id: DeploymentId,
},
NoPreviousSnapshot {
deployment_id: DeploymentId,
},
SnapshotMissing {
prev_ref: PathBuf,
},
SnapshotDecode {
detail: String,
},
Invalid(SpecError),
}Expand description
Failures produced by the pure traffic-split transforms. Each backend
maps these onto its own error vocabulary — LocalFsStore →
StoreError, the operator-store-server →
crate::remote::RemoteStoreError. Display strings are the verbatim
operator-facing messages the local store has always rendered.
(Not Clone: the TrafficSplitError::Invalid payload, SpecError,
isn’t.)
Variants§
DeploymentNotFound
The targeted deployment does not exist in the environment.
RevisionNotFound
An entry references a revision that does not exist (set-path referential check — maps to the dependent-not-found noun).
WrongDeployment
An entry references a revision owned by a different deployment.
IdempotencyKeyReused
A retry reused an idempotency key with different entries — a protocol violation, not a replay.
AdmissionRevisionMissing
§5.3 admission found a routed revision missing from the env. Same
message as TrafficSplitError::RevisionNotFound but a distinct
variant: on the rollback path a historical split may reference a
since-removed revision, which is a state conflict (409), not a
caller-supplied bad id (404).
NotReady
§5.3 admission: only Ready revisions may receive traffic.
SnapshotEncode
Serializing the prior split for the rollback stash failed.
NoSplit
No split exists for the deployment (rollback path).
NoPreviousSnapshot
The live split carries no one-step-previous snapshot to restore.
Fields
deployment_id: DeploymentIdSnapshotMissing
The previous_split_ref token failed to decode.
SnapshotDecode
The decoded snapshot failed to deserialize as a TrafficSplit.
Invalid(SpecError)
The assembled split failed spec validation (schema discriminator / 10,000 bps sum invariant).
Trait Implementations§
Source§impl Debug for TrafficSplitError
impl Debug for TrafficSplitError
Source§impl Display for TrafficSplitError
impl Display for TrafficSplitError
impl Eq for TrafficSplitError
Source§impl Error for TrafficSplitError
impl Error for TrafficSplitError
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<SpecError> for TrafficSplitError
impl From<SpecError> for TrafficSplitError
Source§impl PartialEq for TrafficSplitError
impl PartialEq for TrafficSplitError
Source§fn eq(&self, other: &TrafficSplitError) -> bool
fn eq(&self, other: &TrafficSplitError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrafficSplitError
Auto Trait Implementations§
impl Freeze for TrafficSplitError
impl RefUnwindSafe for TrafficSplitError
impl Send for TrafficSplitError
impl Sync for TrafficSplitError
impl Unpin for TrafficSplitError
impl UnsafeUnpin for TrafficSplitError
impl UnwindSafe for TrafficSplitError
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<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