== Definitions ==
rpmlint
FAILED
[item under test]
task
Multiple roles can, of course, be part of one real-life person, but that is not important for the overall concept.
== Task Outcome ==
While discussing this ticket (adding CRASHED as a test result) with @kparal, we came to realize, that although we do have the semantics for individual Outcome variants (currently 'PASSED', 'INFO', 'FAILED', 'NEEDS_INSPECTION', 'ABORTED', 'CRASHED'), it unnecessarily combines together the actual outcome, and execution status of the task.
CRASHED
'PASSED', 'INFO', 'FAILED', 'NEEDS_INSPECTION', 'ABORTED', 'CRASHED'
After intense consideration, we think that Maintainers should do fine with these variants of Task Outcome: * Pass - everything went OK, no need worry: PASSED * Conditional pass - when some not-that-important parts of the test fail (e.g. a subcheck in rpmgrill), so the overall result is considered to be PASSED, but someone might want to have a look at that - INFO (considered as PASSED for Bodhi/gating/whatever) * Fail - it all went sideways, we should not let this go through - FAILED * Unknown - maybe test provided only partial results, or there is some special case in Depcheck, that can not be automatically decided between PASSED and FAILED, any time when real-life-person's intervention is needed in order to determine outcome, or any time when the maintainer should be notified, but neither of the previous variants really fit - NEEDS_INSPECTION (considered as "no result present" for Bodhi/gating/whatever tool)
PASSED
INFO
NEEDS_INSPECTION
Thus reducing the Outcome variants to PASSED, INFO, FAILED, NEEDS_INSPECTION.
PASSED, INFO, FAILED, NEEDS_INSPECTION
== Execution Status ==
At the moment, we do not store any information about the Task Execution status. ResultsDB directive just marks all the Jobs as Completed, and we do not provide any way to change the Job's status. I'm also quite sure, that the Job (as implemented now) is unnecessary, as it was originally there to represent the Global Execution status, but never really got used to it. More on what to change in ResultsDB in the Proposed Changes section.
Global Execution status is represented by the Buildbot's steps. Specifically the runtask step, and can be seen (and searched for in the future) in ExecDB. On the other hand, it is not really granular at all now - all we can distinguish is OK or NOT OK, and we can not easily say, whether the crash was caused by Libtaskotron's code or the task's (userspace) code.
runtask
OK
NOT OK
For the NOT OK we would want to recognize at least these: * error in taskotron - exception in libtaskotron, disposable minion not started - most probably will not be "fixed" by a rerun * error in resource - koji timed out, repo not synced, ... - fair chance that re-run will cause non-error result * error in userspace/task - task's code throws errors, or fails to run
So the relevant party can be notified.
== Proposed changes ==
=== ResultsDB ===
=== ExecDB ===
TASKOTRON_ERROR, RESOURCE_ERROR, TASK_ERROR
=== Libtaskotron ===
try/except
python directive
koji directive
RESOURCE_ERROR
==== Docs ====
TASK_ERROR
Yesterday we discussed with @jskladan an extension of this - allowing the task developers to set some flag //"alert me about this task run"//, for whatever reason (e.g. debugging random and infrequent issues, like the one we experienced in depcheck). Since the task developer is often not the same as the package maintainer (esp. for generic checks like rpmlint and depcheck), we don't want task developers to misuse task outcome for this - they should not set NEEDS_INSPECTION or INFO when something bad happens inside their task, as long as they still decide whether the overall outcome is pass or fail. Package maintainers will not want to debug the task, they will not understand it, we should not bother them with it. But still we want have an easy way for task developers to mark such executions as //"alert me about this"//.
depcheck
There are multiple ways to how deal with this. We can recommend task devs to use a specific result keyval and then allow ResultsDB to find such results easily (a checkbox //"developer alerts"// in the search UI). Another approach is to use upcoming namespaces, and instead of using keyvals, simply report the result to a dev namespace (the namespace would mirror other namespaces like qa and pkg etc, just prefix everything with dev, so dev.qa, dev.pkg, etc). This can be done as a direct support in CheckDetail so that you just set CheckDetail.dev = True or similar, and such result will be exported to ResultsYAML as using the dev namespace. So if you wanted to report both to qa.depcheck and dev.qa.depcheck, you would clone the CheckDetail object and set the flag on one of them. You can do this just for selected CheckDetails, which is nice - your alert can be very targeted. This also nicely solves the use case when you can't decide whether the result is pass or fail at all. You simply don't report it into standard namespaces at all, just to dev namespace. The package maintainer won't receive any outcome, but the task developer will, and can start debugging the issue.
dev
qa
pkg
dev.qa
dev.pkg
CheckDetail
CheckDetail.dev = True
qa.depcheck
dev.qa.depcheck
We could also use this approach for reporting task crashes (not caused by libtaskotron or transient network errors) to ResultsDB to dev namespace (only).
Log in to comment on this ticket.