Event information model for Toaster: Difference between revisions

From Yocto Project
Jump to navigationJump to search
m (moved Event information to Web Hob Event information: This page relates to the Web Hob project.)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This is the information we need for completing the tables of the WebHOB database.
[[Category:Toaster]]


This is the information we need for completing the tables of the Toaster database.


==== TASKS ====
==== BUILD ====


:uuid : <span style="color: green">DONE</span> : unique task id
:target : <span style="color: red">N/A</span> : # OneToMany to the targets table
:machine : <span style="color: green">DONE</span> : # index into all the machines that we support ? # we can ask bitbake for the MACHINE variable
:distro : <span style="color: green">DONE</span> : # variable - DISTRO
:distro_version : <span style="color: green">DONE</span> : # variable - DISTRO_VERSION
:started_on : <span style="color: green">DONE</span> # use BuildStarted event
:completed_on <span style="color: green">DONE</span> # use BuildCompleted event
:outcome : <span style="color: green">DONE</span> # We can grab this at the end of all commands by checking the errors number or the return value.
:number_of_errors <span style="color: green">DONE</span> # total number of log events with level of ERROR (see knotty)
:number_of_warnings <span style="color: green">DONE</span>  # total number of log events with level of WARNING (see knotty)
:cpu_usage : <span style="color: red">N/A</span>  # it's in the build stats; we don't have a meaning
:disk_io : <span style="color: red">N/A</span>  # it's in the build stats; we don't have a meaning
:cooker_log_path : <span style="color: green">DONE</span>  # main cooker log - composed of all log events over the set log level (see knotty)
:build_name : <span style="color: green">DONE</span>  # variable - BUILDNAME
:bitbake_version : <span style="color: green">DONE</span> # variable - BB_VERSION
! This has been removed for the moment -> output : <span style="color: red">N/A</span>  # list of generated files; downloads - please check how Hob does this
==== TASK ====
:uuid : <span style="color: green">DONE</span> -> generated at the beginning of each build.
:uuid : <span style="color: green">DONE</span> -> generated at the beginning of each build.
:task_id : <span style="color: red">NOT AVAILABLE</span>
:order : <span style="color: green">DONE</span> -> counted on each TaskStarted event
:order : <span style="color: green">DONE</span> -> counted on each TaskStarted event
:task_executed : <span style="color: red">NOT AVAILABLE</span>
:task_executed : <span style="color: green">DONE</span> -> set to True for each TaskStarted event
:outcome : <span style="color: green">DONE</span>? -> retrieved from event.getDisplayName() #is this OK ?
:outcome : <span style="color: green">DONE</span> -> get from TaskFailed / TaskSucceeded
:sstate_checksum : <span style="color: red">NOT AVAILABLE</span>
:sstate_checksum : <span style="color: red">N/A</span>  
:path_to_sstate_obj : <span style="color: red">NOT AVAILABLE</span>
:path_to_sstate_obj : <span style="color: red">N/A</span>  
:recipe : <span style="color: green">DONE</span> -> retrieved from event._package
:recipe : <span style="color: green">DONE</span> -> retrieved from event._package
:task_name : <span style="color: green">DONE</span> -> retrieved from event._task
:task_name : <span style="color: green">DONE</span> -> retrieved from event._task
:source_url : <span style="color: red">NOT AVAILABLE</span>
*index on recipe / task_name
:log_file: <span style="color: red">NOT AVAILABLE</span>
:source_url : <span style="color: red">N/A</span>
:work_directory : <span style="color: red">NOT AVAILABLE</span>
:log_file: <span style="color: red">DONE</span> -> TaskFailed event reports this, need to do same for TaskSucceeded OR report it on TaskStarted
:script_type : <span style="color: red">NOT AVAILABLE</span>
:work_directory : <span style="color: green">DONE</span> -> WORKDIR variable for recipe
:file_path : <span style="color: red">NOT AVAILABLE</span>
:script_type : <span style="color: red">N/A</span>
:line_number : <span style="color: red">NOT AVAILABLE</span>
:file_path : <span style="color: red">N/A</span>  
:py_stack_trace : <span style="color: red">NOT AVAILABLE</span>
:line_number : <span style="color: red">N/A</span>  
:disk_io : <span style="color: red">NOT AVAILABLE</span>
:py_stack_trace : <span style="color: red">N/A</span>  
:cpu_usage : <span style="color: red">NOT AVAILABLE</span>
:disk_io : <span style="color: green">DONE</span> -> gather from buildstats
:cpu_usage : <span style="color: green">DONE</span> -> gather from buildstats
:elapsed_time : <span style="color: green">DONE</span> -> difference between started and finished time
:elapsed_time : <span style="color: green">DONE</span> -> difference between started and finished time
:dependent_tasks : <span style="color: red">NOT AVAILABLE</span>
:errors_no : <span style="color: red">N/A</span>
:errors_no : <span style="color: red">NOT AVAILABLE</span>
:warnings_no : <span style="color: red">N/A</span>
:warnings_no : <span style="color: red">NOT AVAILABLE</span>
:error : <span style="color: red">N/A</span>
:error : <span style="color: red">NOT AVAILABLE</span>
:warning : <span style="color: red">N/A</span>
:warning : <span style="color: red">NOT AVAILABLE</span>
:sstate_result : <span style="color: green">DONE</span> -> get from result of setscene task execution (mapped using sstate_name of task as defined in the metadata)
:sstate_result : <span style="color: red">NOT AVAILABLE</span>
:diffsigs : <span style="color: red">N/A</span> [drop this]
 
==== TASK DEPENDENCY ====
:task : <span style="color: red">N/A</span>
:depends_on : <span style="color: red">N/A</span>  # still a task_id
 
==== TARGET ====
:build : <span style="color: red">N/A</span> # of build that generated the image
:is_image : <span style="color: red">N/A</span>
! TBC
 
==== ARTIFACT ====
:build : <span style="color: red">N/A</span>
:target_id : <span style="color: red">N/A</span>
:file_name : <span style="color: red">N/A</span>
:file_size : <span style="color: red">N/A</span>
 
==== PACKAGE IN IMAGE ====
:package : <span style="color: green">N/A</span> -> gather from buildhistory?
:target : <span style="color: green">N/A</span> -> gather from buildhistory?
 
==== PACKAGE ====
:recipe : <span style="color: green">DONE</span>  -> gather from pkgdata  # recipe that generated this package
:name : <span style="color: green">DONE</span>  -> gather from pkgdata
:version : <span style="color: green">DONE</span>  -> gather from pkgdata
:size : <span style="color: green">DONE</span> -> gather from pkgdata
 
==== PACKAGE DEPENDENCY ====
:package : <span style="color: green">DONE</span>  -> gather from buildhistory?
:depends_on : <span style="color: green">DONE</span>  -> gather from buildhistory?
 
==== FILELIST ====
:package : <span style="color: green">DONE</span> # id in the list of packages
:complete_file_path : <span style="color: green">DONE</span> -> pkgdata has this
:file_size : <span style="color: green">DONE</span> -> this will need to be gathered at package time. Perhaps pkgdata should be extended to reformat the file listing such that we can also include sizes.
 
==== RECIPE ====
# This information will need to be read in the same manner that hob reads it
:name : <span style="color: red">N/A</span>
:version : <span style="color: red">N/A</span>
:layer : <span style="color: green">DONE</span> -> determine from longest path match in BBLAYERS
:summary : <span style="color: red">N/A</span>
:description : <span style="color: red">N/A</span>
:section : <span style="color: red">N/A</span>  ?
:license : <span style="color: red">N/A</span>
:licensing info: <span style="color: red">N/A</span> ?
:homepage : <span style="color: red">N/A</span>  ?
:bugtracker : <span style="color: red">N/A</span> ?
:author : <span style="color: red">N/A</span> # drop this, it's not consistently available
:file_path : <span style="color: red">N/A</span>  ?
 
==== RECIPE DEPENDENCY ====
:recipe : <span style="color: green">DONE</span> -> FK to recipe
:depends_on : <span style="color: green">N/A</span> -> determine from DEPENDS variable (see above)
 
==== LAYER ====
:name : <span style="color: green">DONE</span> -> just take the directory name
:local_path : <span style="color: green">DONE</span> -> get from BBLAYERS or look at how do_show_layers works in bitbake-layers
:layer_index_url: <span style="color: green">DONE</span> -> we may have to guess this based on the name if we must include it since this info is not stored explicitly anywhere
! TBC
 
==== BUILD_LAYER ====
:build : <span style="color: green">DONE</span> -> FK to build
:layer : <span style="color: green">DONE</span> -> FK to layer (auto-created if it doesn't exist)
:branch : <span style="color: green">DONE</span> -> will need to query git for this (as get_layers_branch_rev() in classes/base.bbclass does)
:commit : <span style="color: green">DONE</span> -> see above
:priority : <span style="color: green">DONE</span> -> look at how do_show_layers works in bitbake-layers
 
==== VARIABLE ====
:build : <span style="color: green">DONE</span> -> FK to build
:variable_name : <span style="color: green">DONE</span> -> need to run equivalent of bitbake -e
:variable_value : <span style="color: green">DONE</span>  -> need to run equivalent of bitbake -e
:file : <span style="color: green">DONE</span> -> need to run equivalent of bitbake -e with history enabled # a single file name where the variable is set
:changed : <span style="color: red">N/A</span> # needs design clarification - it's not really practical to calculate this as a boolean
:human_readable_name : <span style="color: green">DONE</span> -> get from documentation.conf (will need updating)
:description : <span style="color: red">N/A</span> # Drop this, we will provide a link to the variable glossary in the manual based on the name
 
==== MACHINE ====
:name : <span style="color: red">N/A</span> -> MACHINE variable
:description : <span style="color: green">DONE</span> -> probably need to extract this from the machine .conf file as the OE layer index does

Latest revision as of 13:19, 15 October 2013


This is the information we need for completing the tables of the Toaster database.

BUILD

uuid : DONE : unique task id
target : N/A : # OneToMany to the targets table
machine : DONE : # index into all the machines that we support ? # we can ask bitbake for the MACHINE variable
distro : DONE : # variable - DISTRO
distro_version : DONE : # variable - DISTRO_VERSION
started_on : DONE # use BuildStarted event
completed_on DONE # use BuildCompleted event
outcome : DONE # We can grab this at the end of all commands by checking the errors number or the return value.
number_of_errors DONE # total number of log events with level of ERROR (see knotty)
number_of_warnings DONE # total number of log events with level of WARNING (see knotty)
cpu_usage : N/A # it's in the build stats; we don't have a meaning
disk_io : N/A # it's in the build stats; we don't have a meaning
cooker_log_path : DONE # main cooker log - composed of all log events over the set log level (see knotty)
build_name : DONE # variable - BUILDNAME
bitbake_version : DONE # variable - BB_VERSION

! This has been removed for the moment -> output : N/A # list of generated files; downloads - please check how Hob does this


TASK

uuid : DONE -> generated at the beginning of each build.
order : DONE -> counted on each TaskStarted event
task_executed : DONE -> set to True for each TaskStarted event
outcome : DONE -> get from TaskFailed / TaskSucceeded
sstate_checksum : N/A
path_to_sstate_obj : N/A
recipe : DONE -> retrieved from event._package
task_name : DONE -> retrieved from event._task
  • index on recipe / task_name
source_url : N/A
log_file: DONE -> TaskFailed event reports this, need to do same for TaskSucceeded OR report it on TaskStarted
work_directory : DONE -> WORKDIR variable for recipe
script_type : N/A
file_path : N/A
line_number : N/A
py_stack_trace : N/A
disk_io : DONE -> gather from buildstats
cpu_usage : DONE -> gather from buildstats
elapsed_time : DONE -> difference between started and finished time
errors_no : N/A
warnings_no : N/A
error : N/A
warning : N/A
sstate_result : DONE -> get from result of setscene task execution (mapped using sstate_name of task as defined in the metadata)
diffsigs : N/A [drop this]

TASK DEPENDENCY

task : N/A
depends_on : N/A # still a task_id

TARGET

build : N/A # of build that generated the image
is_image : N/A

! TBC

ARTIFACT

build : N/A
target_id : N/A
file_name : N/A
file_size : N/A

PACKAGE IN IMAGE

package : N/A -> gather from buildhistory?
target : N/A -> gather from buildhistory?

PACKAGE

recipe : DONE -> gather from pkgdata # recipe that generated this package
name : DONE -> gather from pkgdata
version : DONE -> gather from pkgdata
size : DONE -> gather from pkgdata

PACKAGE DEPENDENCY

package : DONE -> gather from buildhistory?
depends_on : DONE -> gather from buildhistory?

FILELIST

package : DONE # id in the list of packages
complete_file_path : DONE -> pkgdata has this
file_size : DONE -> this will need to be gathered at package time. Perhaps pkgdata should be extended to reformat the file listing such that we can also include sizes.

RECIPE

  1. This information will need to be read in the same manner that hob reads it
name : N/A
version : N/A
layer : DONE -> determine from longest path match in BBLAYERS
summary : N/A
description : N/A
section : N/A  ?
license : N/A
licensing info: N/A ?
homepage : N/A  ?
bugtracker : N/A  ?
author : N/A # drop this, it's not consistently available
file_path : N/A  ?

RECIPE DEPENDENCY

recipe : DONE -> FK to recipe
depends_on : N/A -> determine from DEPENDS variable (see above)

LAYER

name : DONE -> just take the directory name
local_path : DONE -> get from BBLAYERS or look at how do_show_layers works in bitbake-layers
layer_index_url: DONE -> we may have to guess this based on the name if we must include it since this info is not stored explicitly anywhere

! TBC

BUILD_LAYER

build : DONE -> FK to build
layer : DONE -> FK to layer (auto-created if it doesn't exist)
branch : DONE -> will need to query git for this (as get_layers_branch_rev() in classes/base.bbclass does)
commit : DONE -> see above
priority : DONE -> look at how do_show_layers works in bitbake-layers

VARIABLE

build : DONE -> FK to build
variable_name : DONE -> need to run equivalent of bitbake -e
variable_value : DONE -> need to run equivalent of bitbake -e
file : DONE -> need to run equivalent of bitbake -e with history enabled # a single file name where the variable is set
changed : N/A # needs design clarification - it's not really practical to calculate this as a boolean
human_readable_name : DONE -> get from documentation.conf (will need updating)
description : N/A # Drop this, we will provide a link to the variable glossary in the manual based on the name

MACHINE

name : N/A -> MACHINE variable
description : DONE -> probably need to extract this from the machine .conf file as the OE layer index does