Implement Trivy adapter, contain job panics, fail interrupted runs on startup
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / ui (push) Has been cancelled

The Trivy scanner still had unimplemented stubs, which panicked the scan
task in the deployed test instance and left the run in 'running' forever.
JobRunner now runs handlers in their own task and marks a panic as a
failed run; on startup runs left 'running' by a previous process are
marked failed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Dennis Nemec
2026-09-02 22:58:16 +02:00
parent 872f4373ff
commit 5026ce22de
7 changed files with 212 additions and 15 deletions

View File

@ -78,6 +78,8 @@ pub trait JobRunRepository: Send + Sync {
async fn list(&self, limit: u32) -> Result<Vec<JobRun>, DomainError>;
async fn find_running(&self, kind: JobKind) -> Result<Option<JobRun>, DomainError>;
async fn last_finished(&self, kind: JobKind) -> Result<Option<JobRun>, DomainError>;
/// All runs still marked running (e.g. after a crash).
async fn running(&self) -> Result<Vec<JobRun>, DomainError>;
}
/// Reads the state of the Debian host.