pub struct Integrator {
pub ml: Mainline,
pub gate_jobs: usize,
pub board: GateBoard,
/* private fields */
}Fields§
§ml: Mainline§gate_jobs: usizeVerification rows run at once.
board: GateBoardWhere the integrator says which step and commands it is running.
Implementations§
Source§impl Integrator
impl Integrator
pub fn new(ml: Mainline, gate_jobs: usize) -> Integrator
Sourcepub fn with_rotten_sink(
self,
sink: impl Fn(Vec<RottenRow>) + Send + 'static,
) -> Integrator
pub fn with_rotten_sink( self, sink: impl Fn(Vec<RottenRow>) + Send + 'static, ) -> Integrator
The integrator, telling sink of rotten rows as soon as it finds
them.
Sourcepub fn take_rotten(&self) -> Vec<RottenRow>
pub fn take_rotten(&self) -> Vec<RottenRow>
The rows found rotten since the last call, in the order found.
Sourcepub fn hold_rotten(&self, unit: &str)
pub fn hold_rotten(&self, unit: &str)
Leave unit’s rows out of the lane’s gates: it is rotten.
Sourcepub fn forget_rotten(&self, unit: &str)
pub fn forget_rotten(&self, unit: &str)
Run unit’s rows at the lane’s gates again: it is no longer held
rotten (its culprit search found the row flaky, or it was rebuilt).
Sourcepub fn with_board(self, board: GateBoard) -> Integrator
pub fn with_board(self, board: GateBoard) -> Integrator
The integrator, reporting its progress to board.
Sourcepub fn integrate(
&self,
req: &IntegrateRequest,
memo: &mut GateMemo,
before_publish: Option<&dyn Fn()>,
) -> Result<Outcome, CoreError>
pub fn integrate( &self, req: &IntegrateRequest, memo: &mut GateMemo, before_publish: Option<&dyn Fn()>, ) -> Result<Outcome, CoreError>
Integrate one Built unit. before_publish is a test seam fired after
the gate and before the CAS/push (lost-race rehearsals).
Sourcepub fn integrate_batch(
&self,
reqs: &[IntegrateRequest],
memo: &mut GateMemo,
before_publish: Option<&dyn Fn()>,
) -> Result<Vec<Outcome>, CoreError>
pub fn integrate_batch( &self, reqs: &[IntegrateRequest], memo: &mut GateMemo, before_publish: Option<&dyn Fn()>, ) -> Result<Vec<Outcome>, CoreError>
Integrate every request as one batch: one gate run for all of them.
Outcomes are index-aligned with reqs. A red batch of several is
integrated again one at a time.
Sourcepub fn benign(&self, old: &str, new: &str) -> Result<bool, CoreError>
pub fn benign(&self, old: &str, new: &str) -> Result<bool, CoreError>
benign for this integrator’s repository.
Sourcepub fn recheck(&self, units: &[String]) -> Result<Rechecked, CoreError>
pub fn recheck(&self, units: &[String]) -> Result<Rechecked, CoreError>
A re-check batch for units, which a change reached and whose
dependencies have no work pending: in the lane’s integration checkout
at the mainline head (taken under its lock), their rows then the §5
Test command (recheck::run). The passes are recorded as one
re-check commit; failing rows make their units rotten, held out of
the lane’s later gates. No worker takes part.
Sourcepub fn check_head(
&self,
memo: &mut GateMemo,
want_suite: bool,
) -> Result<HeadCheck, CoreError>
pub fn check_head( &self, memo: &mut GateMemo, want_suite: bool, ) -> Result<HeadCheck, CoreError>
The mainline head as the termination report needs it: the audit
(checks 1–3 and 5–7), the rows of the units a change reached since
their last recorded check, and — when want_suite — the §5 Test
command, unless its recorded pass still holds. Units held rotten are
not run again.