action #29289
Updated by nicksinger over 7 years ago
While checking the latest logwarns I noticed the following behavior in openQA: ``` [Mon Dec 11 09:27:37 2017] [5339:warn] /var/lib/openqa/share/tests/sle/products/sle/needles/welcome-bsc1058099-20170915.json: No such file or directory […] [Mon Dec 11 09:27:51 2017] [5228:warn] /var/lib/openqa/share/tests/sle/products/sle/needles/welcome-bsc1058099-20170915.json: No such file or directory […] [Mon Dec 11 09:43:56 2017] [11050:warn] /var/lib/openqa/share/tests/sle/products/sle/needles/welcome-bsc1058099-20170915.json: No such file or directory [Mon Dec 11 09:43:56 2017] [11050:error] Could not parse needle: welcome-bsc1058099-20170915 for sle 15 ``` I guess this happens because somebody viewed a Job in the webUI which used the "welcome-bsc1058099-20170915" while the needle was already deleted. Later on, on this code: https://github.com/os-autoinst/openQA/blob/8f30ca8dc7bc0b9bbb48a6507110fa06dd335aff/lib/OpenQA/WebAPI/Controller/Step.pm#L244 tried to access the needle - therefore the error message. So my suggestion to resolve this would be: * Check if needles exists on the FS before accessing it * Properly handle non existent needles (e.g. do not blindly access them if they do not exist) * Notify the user somehow that this job used a needle which was deleted meanwhile * E.g. show in the needle selection: "99% old_needle_name (deleted meanwhile)" * Disable the needle-compare-function if the reference does not exist anymore * … For now I'll add these two log-messages to the ignore-list of logwarn since they don't show a critical error (99% of the time) we've to react upon.