pub enum LifecycleEvent {
DemandObserved {
policy: PolicyId,
demand: u32,
not_matched: u32,
unresolvable: u32,
complete: bool,
},
TargetUnreadable {
policy: PolicyId,
reason: &'static str,
},
Allocated {
policy: PolicyId,
demand: u32,
desired: u16,
active_owned: u16,
headroom: u16,
to_start: u16,
limiting: LimitingFactor,
},
MonitorOnlySkipped {
policy: PolicyId,
},
RunnerStarted {
policy: PolicyId,
attempt: AttemptId,
},
RunnerStartFailed {
policy: PolicyId,
reason: &'static str,
},
AllocationDeferred {
policy: PolicyId,
count: u16,
},
AttemptsUnreadable {
reason: &'static str,
},
AttemptCleaned {
policy: PolicyId,
attempt: AttemptId,
outcome: OutcomeKind,
},
AttemptCleanFailed {
policy: PolicyId,
attempt: AttemptId,
reason: &'static str,
},
ScaleDownRefused {
policy: PolicyId,
attempt: AttemptId,
},
PollScheduled {
retry_in_ms: u64,
pace: PollPace,
},
}Expand description
What g2’s activity view and the local log sink see.
Every field is an identifier, a count, a duration, or a &'static str
drawn from a closed set. There is no String anywhere in this enum, which
is what makes “no emitted event contains a token, a JIT blob, or a credential
header” a property of the type rather than a discipline each call site has to
keep. tests::no_emitted_event_can_carry_a_credential renders every variant
through d1’s scrubber and asserts nothing changes, with a positive control
so the assertion cannot pass vacuously.
Variants§
DemandObserved
A demand poll answered for one target.
Fields
not_matched: u32Queued jobs whose required labels this policy does not carry.
Never demand. Reported because the difference between this and
demand is the whole value of the label filtering, and an operator
wondering why a busy repository started no runners is owed it.
unresolvable: u32Queued jobs whose runs-on could not be resolved statically.
b1 requires these be “reported as unresolvable rather than silently
counted or silently dropped”: counting one would start a runner for a
job that may not be ours, and dropping it would hide a workflow this
host can never serve. A count rather than the reasons themselves
because this type is Copy, and c4 logs the reasons where it
builds them.
TargetUnreadable
A target could not be polled, so its policies start nothing this pass.
Allocated
One policy’s share of the pass.
Fields
limiting: LimitingFactorMonitorOnlySkipped
A monitor-only policy was skipped entirely, before any demand request was issued for it (D19).
RunnerStarted
One runtime was created and one runner started.
RunnerStartFailed
One runner could not be started.
AllocationDeferred
The allocation lock was not free, so count runners this policy was
granted were not created this pass.
AttemptsUnreadable
The host’s attempt set could not be read at all.
Distinct from an empty set on purpose, and the whole reason
RunnerLauncher::attempts is fallible: the two produce the same
number and demand opposite actions.
AttemptCleaned
A terminal attempt’s runtime was removed.
AttemptCleanFailed
A terminal attempt’s runtime could not be removed. It will be retried on the next pass, and this is what keeps that retry from being silent.
ScaleDownRefused
Scale-down declined to remove a runner that is executing a job.
PollScheduled
When the next poll is, and why then.
Implementations§
Trait Implementations§
Source§impl Clone for LifecycleEvent
impl Clone for LifecycleEvent
Source§fn clone(&self) -> LifecycleEvent
fn clone(&self) -> LifecycleEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LifecycleEvent
Source§impl Debug for LifecycleEvent
impl Debug for LifecycleEvent
Source§impl Display for LifecycleEvent
impl Display for LifecycleEvent
impl Eq for LifecycleEvent
Source§impl PartialEq for LifecycleEvent
impl PartialEq for LifecycleEvent
impl StructuralPartialEq for LifecycleEvent
Auto Trait Implementations§
impl Freeze for LifecycleEvent
impl RefUnwindSafe for LifecycleEvent
impl Send for LifecycleEvent
impl Sync for LifecycleEvent
impl Unpin for LifecycleEvent
impl UnsafeUnpin for LifecycleEvent
impl UnwindSafe for LifecycleEvent
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
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.