Skip to main content

Module requeue

Module requeue 

Source
Expand description

Requeue-action primitives — the small typed layer over the kube::runtime::controller::Action::requeue(std::time::Duration ::from_secs(<secs>)) two-link chain every phase-machine handler, error-policy sink, and Signals ingest arm in the workspace exits through.

kube_runtime exposes only ONE requeue constructor — Action::requeue(std::time::Duration) — but every consumer in this workspace already carries its retry / heartbeat / short- retry budget as a whole-second u64 (the module-level TICK_RETRY / HEARTBEAT / SHORT_RETRY constants, the per-call literals 1, 5, 10, 15, 30, 60, 120, and the ctx.config.heartbeat_seconds slot). This module owns the one-line chain from that u64 to the returned Action, so a future normalization (an injectable-jitter overlay, a bounded- rate limiter, a per-controller floor / ceiling clamp, a deterministic-clock test hook) lands at ONE substrate primitive and every downstream retry sink inherits the upgrade mechanically.

Constants§

ERROR_BACKOFF_SECONDS
Second-count budget for the “back off after a reconcile error” requeue intent (15s). Bound by the bare 15 literal in tatara-pool-reconciler::controller_pool::error_policy (Pool reconcile-failure backoff) and by the bare 15 literal in tatara-pool-reconciler::controller_allocation::error_policy (Allocation reconcile-failure backoff), past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across two files that each named the same intent independently.
HEARTBEAT_SECONDS
Second-count budget for the “steady-state heartbeat” requeue intent (30s). Bound by the HEARTBEAT const in tatara-reconciler::phase_machine (7 handler-tail sites), by the bare 30 literal in tatara-reconciler::controller’s reconcile-error sink + error_policy, and by the bare 30 literal in tatara-reconciler::table_controller’s ProcessTable heartbeat + error_policy, past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across three files that each named the same intent independently.
SHORT_RETRY_SECONDS
Second-count budget for the “short retry after transient failure” requeue intent (5s). Bound by the SHORT_RETRY const in tatara-reconciler::phase_machine (execing evaluation / running evaluation / attested probe / reconverging), and by the bare 5 literal in tatara-pool-reconciler::controller_allocation’s bind-retry arm, past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across two files.
TICK_SECONDS
Second-count budget for the “fast re-poll after a state change” requeue intent (1s). The wire-form value binds the Ok(after_secs(TICK_RETRY)) / Ok(after_secs(1)) chains every FSM handler tail + controller.rs signal-consumed / deletion- preempt arm exit through — pre-lift restated as the TICK_RETRY local const in tatara-reconciler::phase_machine and as a bare 1 literal in tatara-reconciler::controller, past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across two files that each named the same intent independently. Post-lift both bind through this ONE workspace-wide constant so a future budget normalization (a bounded-rate limiter’s floor, a jitter overlay’s pivot) lands at ONE owner.

Functions§

after_secs
A kube::runtime::controller::Action that re-enqueues the current object secs seconds from now — the one-line Action::requeue(Duration::from_secs(secs)) two-link chain lifted to ONE typed owner past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold.
error_backoff
The “back off after a reconcile error” requeue action — after_secs(ERROR_BACKOFF_SECONDS).
heartbeat
The “steady-state heartbeat” requeue action — after_secs(HEARTBEAT_SECONDS).
short_retry
The “short retry after transient failure” requeue action — after_secs(SHORT_RETRY_SECONDS).
tick
The “fast re-poll” requeue action — after_secs(TICK_SECONDS).