fc-common: add GC pinning and machine health infrastructure

Migration 017 adds `builds.keep`, `jobsets.keep_nr`, and health tracking
columns to `remote_builders`. Repo layer implements `set_keep`,
`list_pinned_ids`, `record_failure` with exponential backoff,
`record_success`, and `find_for_system` filtering of disabled builders.
GC root cleanup now skips pinned builds.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibba121de3dc42f71204e3a8f5776aa8b6a6a6964
This commit is contained in:
raf 2026-02-17 00:02:30 +03:00
commit 5b472a2f57
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
16 changed files with 173 additions and 23 deletions

View file

@ -365,6 +365,8 @@ pub struct DeclarativeJobset {
/// Scheduling priority shares (default 100, higher = more priority)
#[serde(default = "default_scheduling_shares")]
pub scheduling_shares: i32,
/// Number of recent successful evaluations to retain (default 3)
pub keep_nr: Option<i32>,
/// Jobset inputs for parameterized evaluations
#[serde(default)]
pub inputs: Vec<DeclarativeJobsetInput>,
@ -762,6 +764,7 @@ mod tests {
state: None,
branch: None,
scheduling_shares: 100,
keep_nr: None,
inputs: vec![],
}],
notifications: vec![],