beaker icon indicating copy to clipboard operation
beaker copied to clipboard

[BUG] result="New" status="Completed" is reported for tasks that are finished but didn't provide any result

Open pholica opened this issue 4 years ago • 0 comments

Describe the bug
result="New" status="Completed" is reported for tasks that are finished but didn't provide any result. If there's no result provided it should be considered as "misconfiguration" and "Warn" result should be set.

Version-Release number 28.2

To Reproduce
Steps to reproduce the behavior:

  1. Create a Beaker task which exits with zero return code
  2. Execute such task in Beaker job with restraint harness
  3. Wait for the submitted job to finish
  4. Check result and status of the task

Actual behavior
result="New" status="Completed" is reported

Expected behavior
result="Warn" status="Completed" is reported

Additional context
I think that this behaviour was implemented in past in beah. Restraint checks for the return code of the test executed and if it's non-zero then result="Warn" status="Aborted" is set. The issue with the "New" result is that it's sometimes available also in other cases when the status is "Completed" but the result is not yet updated, so any kind of automation has to wait for both status="Complete" (or "Aborted") and result being something else than "New" to consider the task as really finished and be able to get the real result. If the "New" result stays, the automation has no way to know if the result will change in future or if it will stay as reported in this issue.

Also this may be a restraint bug which could be also resolved by restraint reporting the result first and then letting the Beaker know that the status should be "Complete", but I haven't checked the restraint code nor the API for task updates and if it's even possible to do it in this order.

pholica avatar Aug 09 '21 14:08 pholica