Regression: Can't delete jobs "holding" assets
I can't delete jobs that are holding last_use_job_id in assets table.
[Mon Dec 18 08:55:21 2017] [5035:error] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: update or delete on table "jobs" violates foreign key constraint "assets_fk_last_use_job_id" on table "
DETAIL: Key (id)=(1329869) is still referenced from table "assets". [for Statement "DELETE FROM jobs WHERE ( id = ? )" with ParamValues: 1='1329869'] at /usr/share/openqa/script/../lib/OpenQA/Schema/Result/Jobs.pm line 273
I assume unsetting that field for gru to let it recalculate is for now good enough - but in fact in this case the asset is generated and leaves the asset in 'no job group'. But these untracked assets are a problem of its own