action #12180
open
[webui] Prevent tests to be triggered when required assets are not present (anymore)
Added by sebchlad over 8 years ago.
Updated almost 5 years ago.
Category:
Feature requests
Description
User story¶
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.
acceptance criteria¶
- 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
tasks¶
- 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)
further details¶
original content: Once of the openQA tests was triggered despite missing asset.
- Assignee deleted (
sebchlad)
- Related to action #13230: Job cloned with clone_job.pl on a job where the assets already got pruned fails because no assets are downloaded added
- 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
- Related to action #2440: new_iso crashes if there are update tests referring to non existant HDDs added
- Has duplicate action #23646: Do not allow through the webui to restart a job if the assets were already cleaned up (very old jobs) added
- Target version changed from future to future
- Related to action #34783: Don't let jobs incomplete if mandatory resources are missing added
- Subject changed from Prevent tests to be triggered when required assets are not present (anymore) to [webui] Prevent tests to be triggered when required assets are not present (anymore)
- Category changed from 122 to Feature requests
- Related to action #28328: job was triggered trying to download HDD image but it's already gone added
- Blocks action #42452: openQA-in-openQA test fails in openqa_webui trying to access a TW snapshot repo on o3 that is already deleted and the test does not track the repo added
- Related to action #46742: test incompletes trying to revert to qemu snapshot auto_review:"Could not open backing file: Could not open .*.qcow.*No such file or directory", likely premature deletion of files from cache added
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 {error => $msg}
which is already handled by javascript to show a flash message when someone tries to trigger the job.
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.
- Related to action #64544: Asset required by scheduled job wiped by limit_assets added
Also available in: Atom
PDF