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: u16Policies 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: u16Runners actually started.
replacement_intents: u16Pre-acceptance attempts routed back through this pass’s ordinary demand/capacity decision.
cleaned: u16Terminal attempts whose runtime was removed.
idle_exits: u16Of those, the surplus case: registered, got no job, exited on its idle timeout. Not a failure.
failures: u16Of those, the ones an operator should look at.
deferred: u16Runners 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: u16Times 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: u16Terminal 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: NextPollWhen to poll next, and why then.
demand_requests: u32Demand requests this pass projected against the shared hourly ceiling.
Implementations§
Source§impl ReconcileReport
impl ReconcileReport
Sourcepub const fn reached_github(&self) -> bool
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
impl ReconcileReport
Sourcepub fn is_offline(&self) -> bool
pub fn is_offline(&self) -> bool
Whether GitHub was unreachable this pass.
Sourcepub const fn offline_state(&self) -> Option<&OfflineState>
pub const fn offline_state(&self) -> Option<&OfflineState>
The offline state to display, when this pass was one.
Sourcepub const fn starts_nothing(&self) -> bool
pub const fn starts_nothing(&self) -> bool
Attempts this pass created. The idle-host assertion reads this.
Trait Implementations§
Source§impl Clone for ReconcileReport
impl Clone for ReconcileReport
Source§fn clone(&self) -> ReconcileReport
fn clone(&self) -> ReconcileReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more