Bug 7365 - Builds in observer mode aren't being registered in the database
Summary: Builds in observer mode aren't being registered in the database
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Undecided critical
Target Milestone: 1.8 M3
Assignee: Alexandru Damian
QA Contact: Ionut Chisanovici
URL:
Whiteboard:
: 7364 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-25 14:40 UTC by Mihail Stanciu
Modified: 2015-03-05 11:54 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
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 Mihail Stanciu 2015-02-25 14:40:33 UTC
Tested on master: 40d80f9e019118ac7bcd268f21e350bc154a4a63

Steps to reproduce
1. Start toaster in observer mode (source toaster start)
2. Start a build once toaster finishes initializing (bitbake core-image-minimal)

Expected result:
Build start should be picked up by toaster and information should be added to the database as the build is being completed.

Observed result:
Build start isn't being picked up by Toaster. Once build finishes, it appears in Toaster, but all tables are empty.
Comment 1 Ionut Chisanovici 2015-02-25 15:06:58 UTC
The only table that is being populated is orm_build.

Also, in the toaster_ui.log the following traceback is repeating for every recipe bb file:

ERROR: Could not match layer version for recipe path /home/ionut/work/poky_1.8/poky/meta/recipes-graphics/xorg-lib/libxrandr_1.4.2.bb : []
ERROR: Your database backend doesn't behave properly when autocommit is off. Turn it on before using 'atomic'.
Traceback (most recent call last):
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/toasterui.py", line 219, in main
    buildinfohelper.store_started_task(event)
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 829, in store_started_task
    recipe_information = self._get_recipe_information_from_taskfile(event.taskfile)
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 703, in _get_recipe_information_from_taskfile
    layer_version_obj = self._get_layer_version_for_path(localfilepath)
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 696, in _get_layer_version_for_path
    unknown_layer, created = Layer.objects.get_or_create(name="__FIXME__unidentified_layer", local_path="/", layer_index_url="")
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 154, in get_or_create
    return self.get_queryset().get_or_create(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 388, in get_or_create
    six.reraise(*exc_info)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 379, in get_or_create
    with transaction.atomic(using=self.db):
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 244, in __enter__
    "Your database backend doesn't behave properly when "
TransactionManagementError: Your database backend doesn't behave properly when autocommit is off. Turn it on before using 'atomic'.

ERROR: 
Traceback (most recent call last):
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/toasterui.py", line 132, in main
    buildinfohelper.update_and_store_task(event)
  File "/home/ionut/work/poky_1.8/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 894, in update_and_store_task
    assert identifier in self.internal_state['taskdata']
AssertionError

Cheers,
Ionut
Comment 2 Alexandru Damian 2015-02-26 19:53:58 UTC
Pushed for review on

adamian/20150225_reviewset
Comment 3 Alexandru Damian 2015-02-26 21:46:24 UTC
*** Bug 7364 has been marked as a duplicate of this bug. ***
Comment 4 Alexandru Damian 2015-02-26 21:47:21 UTC
Pushed for review on bitbake-devel mail list.
Comment 5 Alexandru Damian 2015-02-27 11:57:01 UTC
Merged into master.
Comment 6 Mihail Stanciu 2015-03-05 11:54:47 UTC
Verified on master: 5c1c8af083ca7b57cc339d16ce0513b27c5dac90sql