Skip to main content

ReconcileReport

Struct ReconcileReport 

Source
pub struct ReconcileReport {
Show 16 fields pub allocations: Vec<Allocation>, pub monitor_only: Vec<PolicyId>, pub unreadable: Vec<PolicyId>, pub targets_read: u16, pub started: u16, pub replacement_intents: u16, pub cleaned: u16, pub idle_exits: u16, pub failures: u16, pub deferred: u16, pub attempts_unreadable: u16, pub clean_failures: u16, pub failure: Option<RefreshState>, pub offline: Option<OfflineState>, pub next_poll: NextPoll, pub demand_requests: u32,
}
Expand description

What one reconciliation pass did.

started and the allocations are reported separately on purpose: an allocation is what the pass decided under the lock, and started is what actually came up. They differ when a launch fails or when the lock was held, and collapsing them would hide both.

Fields§

§allocations: Vec<Allocation>

One entry per policy that got as far as being allocated for.

§monitor_only: Vec<PolicyId>

Policies skipped because they are monitor-only (D19).

§unreadable: Vec<PolicyId>

Policies whose target could not be polled this pass.

§targets_read: u16

Policies whose target GitHub actually answered for this pass.

The counterpart to Self::unreadable, and the only honest evidence that this host reached GitHub at all. Self::allocations is not: a policy this host does not own is allocated for with no demand and without any target being polled, so a pass where every poll failed can still end with allocations in it.

§started: u16

Runners actually started.

§replacement_intents: u16

Pre-acceptance attempts routed back through this pass’s ordinary demand/capacity decision.

§cleaned: u16

Terminal attempts whose runtime was removed.

§idle_exits: u16

Of those, the surplus case: registered, got no job, exited on its idle timeout. Not a failure.

§failures: u16

Of those, the ones an operator should look at.

§deferred: u16

Runners this pass was granted but did not start because the allocation lock was held.

Grants, not policies. It used to be incremented once per start_runners call that met a held lock, so a policy that launched two of five and then lost the lock reported 1 while three runners went unstarted – a number that agreed with neither its own name nor its documentation.

§attempts_unreadable: u16

Times the host’s attempt set could not be read this pass.

Non-zero means the pass decided less than it looks like it decided: a policy whose attempt set was unreadable started nothing and is not in Self::allocations, because there was no set to compute an allocation from. It is not the same as the host being idle, which is the whole reason RunnerLauncher::attempts is fallible.

A count, where Self::unreadable is a Vec<PolicyId>, and that asymmetry is deliberate. An unreadable target is a fact about one policy’s GitHub target; an unreadable attempt set is a fact about this host’s journal, which no policy owns — two of the three paths that reach it (clean_terminal_attempts and scale_down) have no policy in hand at all. Naming policies here would mean either inventing an owner for a host-wide failure or reporting a partial list, and both read as more precision than there is. The pass is distinguishable from an idle one, which is what the field exists for; the per-policy attribution is not available, and is recorded as missing rather than faked.

§clean_failures: u16

Terminal attempts whose runtime could not be removed. Retried next pass.

§failure: Option<RefreshState>

The most severe failure across the targets polled, when there was one.

§offline: Option<OfflineState>

What to display while GitHub is unreachable, including how long the outage has run and therefore whether queued work has already been lost.

§next_poll: NextPoll

When to poll next, and why then.

§demand_requests: u32

Demand requests this pass projected against the shared hourly ceiling.

Implementations§

Source§

impl ReconcileReport

Source

pub const fn reached_github(&self) -> bool

Whether this pass actually reached GitHub, which is the only thing that entitles it to write a last GitHub contact.

§Positive evidence, because the absence of a failure is not evidence

The record used to be written whenever Self::failure was None, on the belief that an unauthorized target lands in Self::unreadable rather than in failure. That belief is wrong. unreadable is pushed only from the PollOutcome::Failed arm, failure is the maximum over every Failed reading, and RefreshState::Unauthorized scores 2 — so a non-empty unreadable always implies failure.is_some(), and guarding on both would have changed nothing at all.

The path that really writes a contact record without touching GitHub is a pass that polls nothing: every policy draining, owned by another host, or monitor-only. pollable is then empty, no reading exists, no failure is computed, and the old guard passed. That is how service status can answer healthy on a host doing nothing at all.

So this asks for evidence rather than for the absence of a complaint. A pass with nothing to ask reaches nobody and records nothing, which is what never in service status is for.

Conservative on purpose: repositories.scope_for is a real request that can succeed before a demand poll fails, and it is not counted. Contact that cannot be proven is not claimed.

Source§

impl ReconcileReport

Source

pub fn is_offline(&self) -> bool

Whether GitHub was unreachable this pass.

Source

pub const fn offline_state(&self) -> Option<&OfflineState>

The offline state to display, when this pass was one.

Source

pub const fn starts_nothing(&self) -> bool

Attempts this pass created. The idle-host assertion reads this.

Trait Implementations§

Source§

impl Clone for ReconcileReport

Source§

fn clone(&self) -> ReconcileReport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReconcileReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ReconcileReport

Source§

fn default() -> ReconcileReport

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more