Bug 5763 - Not available outcome when task is not executed.
Summary: Not available outcome when task is not executed.
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6 M4
Assignee: Alexandru Damian
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-01-28 15:11 UTC by Andreea Brandusa Proca
Modified: 2014-03-27 12:51 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreea Brandusa Proca 2014-01-28 15:11:43 UTC
{
    "pk": 468,.
    "model": "orm.task",.
    "fields": {
        "work_directory": "",.
        "cpu_usage": null,.
        "task_executed": false,.
        "disk_io": null,.
        "line_number": 0,.
        "path_to_sstate_obj": "",.
        "sstate_checksum": "",.
        "recipe": 139,.
        "sstate_result": 0,.
        "source_url": "",.
        "elapsed_time": "0",.
        "logfile": "",.
        "build": 1,.
        "task_name": "do_package",.
        "message": "",.
        "outcome": 5,.
        "order": null,.
        "script_type": 0
    }

 "outcome": 5 => from models.py: OUTCOME_NA = 5 and OUTCOME_NA = 'Not Available'

master:1a9226f140f578f11696abf1a3c989fae1d4c14a
Comment 1 Alexandru Damian 2014-01-28 15:16:42 UTC
This works as intended. 

The design specifies that for NoExec tasks, the outcome is *empty*. Since we have to have a value there, the coding for *empty* is OUTCOME_NA, 'Not available'

Not a bug.
Comment 2 Belen Barros Pena 2014-01-28 17:52:04 UTC
Right, that makes sense, but it is a bit confusing, particularly because "not available" used to mean a different thing, and because it seems to be the default value for the 'outcome' field

outcome = models.IntegerField(choices=TASK_OUTCOME, default=OUTCOME_NA)

If we are going to reuse OUTCOME_NA for the Not executed - Empty tasks, can we change the model to say 

(OUTCOME_NA, 'Empty')

and can we make sure it is not the default value for the outcome field?
Comment 3 Alexandru Damian 2014-01-28 18:04:48 UTC
I would actually suggest that this is UI implementation detail, and for OUTCOME_NA we should display actually nothing (empty box), instead of "Empty".

What do you say ?
Comment 4 Belen Barros Pena 2014-01-29 14:31:47 UTC
(In reply to comment #3)
> I would actually suggest that this is UI implementation detail, and for
> OUTCOME_NA we should display actually nothing (empty box), instead of
> "Empty".
> 
> What do you say ?

I don't think we should do that. "Empty" means that the task is empty in the sense that it doesn't have any executable content. "Empty" is the same as "Prebuilt" or "Covered": is the way we name a certain type of task in Toaster. Of all the possible labels we could come up with, we chose "Empty" as the least bad of them all.

In a table where each and every task has an outcome, it would be quite strange to have noexec tasks without one. The outcomes are a classification system for BitBake tasks: to be effective as a classification system, they must cover all tasks without exception. 

I hope this makes sense.
Comment 5 Alexandru Damian 2014-02-12 12:42:12 UTC
Needs label change.
Comment 6 Alexandru Damian 2014-03-27 11:32:09 UTC
The changeset for implementing OUTCOME_EMPTY is merged into origin/master.
Comment 7 Andreea Brandusa Proca 2014-03-27 12:51:33 UTC
Verified in master:ac4ff568f5b2ad4f50a1b7b60797e7b797c314bb