Project

General

Profile

action #99393

Updated by mkittler over 2 years ago

### motivation 
 We've seen in #97979 that the asset cleanup takes long even though there's nothing to be cleaned up after all. This has been optimized in certain places but we still need to check whether the size and fixed status has changed for every asset. Omitting these checks has downsides (see commit messages and comments in https://github.com/os-autoinst/openQA/pull/4227) but it could make sense to omit them optionally. 

 ### acceptance criteria 
 * **AC1:** A Minion asset cleanup task skips the filesystem checks for checking the size and fixed status of assets which have been seen before┬╣. 
 * **AC2:** The existing Minion asset cleanup task still does the full re-scan. 
 * **AC3:** The feature switch is documented. 

 --- 
 ┬╣ Assets which have been seen before have a size in the database (which can be 0). 

 ### suggestions 
 * This could be implemented as a new Minion task or via an argument for the existing one. 
 * The relevant code is contained by `lib/OpenQA/Task/Asset/Limit.pm`. 
 * It would make sense to support/use this in the context of event based triggers. 
 * Also checkout https://github.com/os-autoinst/openQA/pull/4227 which contains code for dealing with fixed assets possibly not detected as such (as the check is omitted).

Back