Idle instances of openQA, e.g. personal single-user developer instances, only trigger cleanup jobs when quota usage is likely to change, e.g. when new builds or jobs are scheduled or jobs complete.
- AC1: Cleanup is triggered based on job finished event
- AC2: No extra minion job for every single finished job
- Look into existing check for available space
- Extend the minion job that already exists to check for "assets" quota, see Limit.pm
In the PR I'm introducing a new option
misc_limits/trigger_cleanup_on_job_done which is
0 by default. Kinda wondering if we shouldn't just configure this through hooks without a new feature? Although we'd have to extend existing hook commands or the scripts we call, the code doesn't do anything special.
Waiting for reviews
Got my reviews. Still found an issue with tests. Apparently conditionally parsing a trigger into an array means it's a string when it's not set at all and leads to
Can't use string ("") as an ARRAY ref, see also my comment on the PR.