pub enum DeliveryFailure {
Preflight {
reason: String,
},
Commit {
reason: String,
},
Push {
reason: String,
retriable: bool,
},
Pr {
reason: String,
retriable: bool,
},
}Expand description
Why a PR delivery stopped, at which stage, and whether the next round should simply try again.
The stage is not decoration: it is the difference between “the work is safe
on disk, re-push it” and “this goal cannot progress without a human”. It
maps 1:1 onto the delivery_failed event’s stage field.
Variants§
Preflight
Refused before touching anything — a missing GitHub credential, a branch
name git/gh would misread, a target branch equal to the base, or either
half of the delivery-head policy (delivery_head_refusal): an
ambiguous head, where the target branch already carries an open pull
request into some other base that the push would silently add this
round’s commits to (ambiguous_head_refusal); or a closed pull
request into this run’s own base, which is somebody’s decision that
this branch should stop (closed_pr_refusal). Never retriable: nothing
about running again changes any of them. Those two are the causes here
that depend on remote STATE rather than on the invocation, so they are
also the ones a stage: "preflight" reader is most likely to misread as
a configuration mistake — clearing either means acting on the other pull
request (closing the ambiguous one, reopening the closed one) or picking
a different --target-branch.
Commit
The worktree could not be committed. Not retriable — the same worktree will fail the same way.
Push
The push was refused. retriable is true for the ordinary case (the
branch moved, so the next round re-cuts from its head and replays) and
false for credential/permission refusals.
Pr
A gh pull-request call failed. Usually retriable (a GitHub API blip);
the work is not lost either way. Reached from two places, and the state
of the remote differs between them: reconciliation runs after the push,
so the commit is safely on the branch, while the head-ambiguity listing
in preflight runs before it, so nothing has been committed or pushed at
all. Both are the same verdict — retry the delivery — which is why they
share a variant.
Implementations§
Trait Implementations§
Source§impl Clone for DeliveryFailure
impl Clone for DeliveryFailure
Source§impl Debug for DeliveryFailure
impl Debug for DeliveryFailure
Source§impl Display for DeliveryFailure
impl Display for DeliveryFailure
Source§impl Error for DeliveryFailure
impl Error for DeliveryFailure
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 DeliveryFailure
impl PartialEq for DeliveryFailure
impl StructuralPartialEq for DeliveryFailure
Auto Trait Implementations§
impl Freeze for DeliveryFailure
impl RefUnwindSafe for DeliveryFailure
impl Send for DeliveryFailure
impl Sync for DeliveryFailure
impl Unpin for DeliveryFailure
impl UnsafeUnpin for DeliveryFailure
impl UnwindSafe for DeliveryFailure
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,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more