[webui] Prevent tests to be triggered when required assets are not present (anymore)
|Target version:||QA - future|
As a unaware user of the webui I do not want to be confused by incomplete tests to save time and not annoy developers learning about the issues.
- AC1: Clicking restart button of a job where the required assets do not exist anymore is not possible with a notice to the user about the reason
- first probably we need to define what "required assets" mean
- check existance of required asset on retrieving job details
- integrate into webUI (user notice preventing retrigger)
- integrate into API (return error)
original content: Once of the openQA tests was triggered despite missing asset.
#3 Updated by okurz about 3 years ago
- Subject changed from Test being executed while some assets are missing/not sync to Prevent tests to be triggered when required assets are not present (anymore)
- Description updated (diff)
- Category set to 122
- Priority changed from Normal to Low
- Target version set to future
https://openqa.suse.de/tests/3320973 is a more severe case of a job that had been scheduled automatically (so not a user restarting it manually). At the time the job had a chance to run the asset was already removed (osd:/var/log/openqa states "[2019-09-04T06:35:23.0481 CEST] [info] Removing asset hdd/sle-12-SP5-ppc64le-Build0303-Server-DVD@ppc64le-gnome-encrypted.qcow2 (assigned to groups: 142)")
#13 Updated by okurz about 1 month ago
mkittler and me tried to come up with ideas as mkittler was already working in a "neighboring code area". Our idea was in the "job_restart" API method to check for the asset existance which we can do simply with methods that the job ResultSet object already has plus utility functions, e.g. lib/OpenQA/Utils.pm:locate_asset like
die 'Missing asset ' . $self->name . "\n" unless locate_asset($self->asset->type, $self->asset->name, mustexist => 1) in the low-level function and in the high-level API function catch the exception and return
What I thought about initial triggering, not cloning, is that we could set the jobs to cancel by checking for asset existance even before asking any workers to pick them up.