aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
AgeCommit message (Collapse)Author
2015-05-08bitbake: toasterui: close build on BuildCompleted eventAlexandru DAMIAN
Moving the code to close the build and instantiate a fresh buildinfohelper object to BuildCompleted event, as the CommandCompleted/Failed/Exit events come in too early. (Bitbake rev: af63abe88327fd5c1b3d7c00a84d9e408ef23285) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08bitbake: toasterui: proper exit code on toaster errorsAlexandru DAMIAN
This patch modifies the toasterui to properly return the exit code based on the errors found in the toaster itself. The upload event file API call will not delete event logs for which toasterui showed an error. This will facilitate debugging. Minor enhancement in the buildinfohelper to reduce the number of lookups on unknown layer objects (prevented testing of the patch). (Bitbake rev: 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-25bitbake: toasterui: enable sanity checkerAlexandru DAMIAN
Since toasterui acts as the user-facing UI, we need to run sanity checks in order to let the GUI display proper warnings and stop the build if something is wrong. (Bitbake rev: 260dd77fa771ae3b777134f4178d344e96b6f3d6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21bitbake: toasterui: improve info in the toaster_ui.logAlexandru DAMIAN
We improve logging and signalling of errors in the toaster_ui.log to facilitate debugging on remote systems. (Bitbake rev: 3cd248f99b90367bd41aab81e255fc1912434890) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20bitbake: toaster: bitbake cooker log saving and downloadingAlexandru DAMIAN
This patch brings in cooker log saving and proper download links. * toasterui will now write the cooker log file if running in managed mode * the BuildRequest has a new state, REQ_ARCHIVE, indicating that the build is completed, and the artifacts are ready to be grabbed * the runbuild test execution commands will gather needed artifacts, and save them to a storage directory selected during Toaster setup. * the build dashboard, project builds and all builds pages have permanent links for the cooker log [YOCTO #7220] [YOCTO #7206] (Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18bitbake: add option to write offline event log fileAlexandru DAMIAN
This patch adds a "-w/--write-log" option to bitbake that writes an event log file for the current build. The name of the file is passed as a parameter to the "-w" argument. If the parameter is the empty string '', the file name is generated in the form bitbake_eventlog_DATE.json, where DATE is the current date and time, with second precision. The "-w" option can also be supplied as the BBEVENTLOG environment variable. We add a script, toater-eventreplay, that reads an event log file and loads the data into a Toaster database, creating a build entry. We modify the toasterui to fix minor issues with reading events from an event log file. Performance impact is undetectable under no-task executed builds. (Bitbake rev: 1befb4a783bb7b7b387d4b5ee08830d9516f1ac2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18bitbake: toasterui: add extra debug and development infosAlexandru DAMIAN
We update and add logs throughout the code in order to help with development. The extra logging is turned off by default, but it can be enabled by using environment variables. All logging happens through the Python logging facilities. The toaster UI will save a log of all incoming events if the TOASTER_EVENTLOG variable is set. If TOASTER_SQLDEBUG is set all DB queries will be logged. If TOASTER_DEVEL is set and the django-fresh module is available, the module is enabled to allow auto-reload of pages when the source is changed. (Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18bitbake: add build artifacts table and other improvementsAlexandru DAMIAN
We add a BuildArtifacts class to store data about files discovered during the build process and not stored anywhere else. Small cosmetic changes in the toasterui. Add model methods to return file path display data relative to the build environment instead of absolute file paths. [YOCTO #6834] (Bitbake rev: bbe24d912869312d561be199b2c029b0c898e049) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28bitbake: toasterui: Compatibility patch for daisy and dizzyAlexandru DAMIAN
This patch brings in changes that allow a toasterUI coming in from 'master' branch to record data from a 'daisy' or 'dizzy' bitbake server. This is needed to allow Toaster to record builds running on older branch releases. (Bitbake rev: 8d75e28e0688a6520311afce36543175f36910b3) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28bitbake: toaster: display Toaster exceptions and other fixesAlexandru DAMIAN
Changing ToasterUI to log toaster exceptions on a different level than build errors. Updating the build dashboard to show Toaster exceptions. We add extra logging to console for exceptions. Fixed a problem where packages database entries were created instead of being looked up in the database, conficting with entries created to satisfy dependency information. Toaster now checks for invalid states at startup and performs needed cleanups. Removed loading reference to jquery-ui.min.css as we do not have this file. (Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12bitbake: toasterui: performance improvementsAlexandru DAMIAN
Improve the performance of data logging in toasterui. We modify the data queries used to: * cache searching in memory * insert in bulk (i.e. multiple values per insert, where possible) On development test rig (networked mysql), on no-op build, time for data recording is reduced from 4:10 to 1:30 (minutes). We also improve the logging, so it is easier to detect toasterui errors. (Bitbake rev: d42784432f927f58730caf80546c66772e0fec89) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06bitbake: toasterui: improvements in data readingAlexandru DAMIAN
We add improvements in data reading, following issues discovered in testing. - elapsed_time is now read from buildstats - we add safeguards to not fail logging if the build was triggered with a toaster_brbe configuration, but it's running in 1.6 mode - added log markups for build finish to let other programs known when the work is done. [YOCTO #6833] [YOCTO #6685] [YOCTO #6887] (Bitbake rev: 0b225035cefee3d3713a93f9a432e5e4d4e174f1) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30bitbake: toaster: change startup parameter passing to avoid raceAlexandru DAMIAN
We avoid a race between the setting the TOASTER_BRBE variable and reading the variable in toaster ui by supplying the variable at server startup time through the toaster.conf post-read file. Additional small changes are included, including marking the build request with the environment id of where the build took place. (Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29bitbake: toasterui: refactor log saving and save out-of-build errorsAlexandru DAMIAN
We refactor log saving to go through only one code path. All logs that happened outside the build (i.e. before build starting) now will be logged to either toaster_ui.log if the build command ran in interactive mode, or to the build request errors if the command ran in managed mode. This enables proper display of error logs in project page. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-14bitbake: toasterui: fix build - project identificationAlexandru DAMIAN
This patches fixes the build - project identification when running under managed mode. The build is assigned to the project from which it was triggered, and to the build request, as to simplify relationships queries in the database. (Bitbake rev: af1d3373706d365f9138caec110fcb20a5966b7b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-14bitbake: toasterui: Show in the log that ToasterUi is ready to receive events.Dave Lerner
Issue: TA53702 It was observed that a sequence in a script such as bitbake --server-only .. bitbake --observe-only .. bitbake <some target> could generate events from the server to the observer before the observer was ready to read the events, and the early events of builds were consistently dropped. Adding a "ready" note in the log allows the script to scan for that message before proceeding to building a target. (Bitbake rev: 9949948f92bbe2717a05a380d3df63a332d39c9a) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13bitbake: toaster: build control functionalityAlexandru DAMIAN
We add the build control functionality to toaster. * The bldcontrol application gains bbcontroller classes that know how to manage a localhost build environment. * The toaster UI now detects it is running under build environment controller, and update the build controller database and will shut down the bitbake server once the build is complete. * The toaster script can now run in standalone mode, launching the build controller and the web interface instead of just monitoring the build, as in the interactive mode. * A fixture with the default build controller entry for localhost is provided. [YOCTO #5490] [YOCTO #5491] [YOCTO #5492] [YOCTO #5493] [YOCTO #5494] [YOCTO #5537] (Bitbake rev: 10988bd77c8c7cefad3b88744bc5d8a7e3c1f4cf) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06bitbake: toaster: update toaster to run in managed modeAlexandru DAMIAN
We disable bitbake self start to prevent race condition. ToasterUI will shutdown the server when the build is done if running in managed mode. We fix usage of kill server flag in the bitbake binary. (Bitbake rev: 30159dbda3a40fa596302f91c705cb5f148c97a9) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05bitbake: toasterui: save warnings from non-build contextAlexandru DAMIAN
Some warnings and errors may come from a non-build context, and they were not saved, even if they were counted for the current build. This patch saves these messages in memory until we have the entire build context available. [YOCTO #5642] (Bitbake rev: fc7a74e7961775b5d7ff25298abed10138d24dc9) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25bitbake: toaster: clean exit on bb server shutdownAlexandru DAMIAN
This patch adds the capability to have the Toaster UI detect when the Bitbake server exited and cleanly trigger a clean shutdown of the system through the toaster starting script. (Bitbake rev: a9cfa3eacfc99550e1ad3f8bb61b2a0bc9b44332) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25bitbake: toasterui: save missed sstate tasksAlexandru DAMIAN
We save the missed sstate tasks as tasks that executed but have the sstate_result set to "SSTATE_MISSED", signaling that the attempt to find an sstate file failed. (Bitbake rev: 6f22e02614adcc642fe011e5e31ca4936d1cb19d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-14bitbake: toaster: add license manifest path to databaseCristiana Voicu
Based on image_name, the target is obtained, and the path is added to the database. [YOCTO #5649] (Bitbake rev: 911b5191133956c30d53f57629c115db196b9ac8) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-14bitbake: toaster: populate target image file tableCristiana Voicu
Using ImageFileSize Metadata event, the image output file and its size are populated into target_image_file table. [YOCTO #5189] [YOCTO #5228] (Bitbake rev: a0b06d362b9aa08fda293489467af343c6ca6de4) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10bitbake: toaster: change package storage modelAlexandru DAMIAN
Up until this patch, package information lived in two places - one table for build packages and one table for target installed packaged. This situation leads to two problems: there is no direct link between a build package and a installed package, and a lot of data is duplicated. This change unifies all package types in a single table. The SimpleUI remains the same for continuity sake, but the REST API will be changed in a future patch. The package dependencies and package files are now kept in a single table. Since we collect target installed package information at all times, we need to expand it to supplement missing information if a package is not actually built in the current build. Small changes to the Simple UI reflect the updated database schema. [YOCTO #5565] [YOCTO #5269] (Bitbake rev: f5d655bfaeb349c8680d74530617e34aa389d1f0) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10bitbake: toaster: update build stats readingAlexandru DAMIAN
In the processes of removing local system accesses from toaster UI, we remove the build stats code that was moved to toaster.bbclass, and adapt the database writing code to read the data from BuildStatsList event sent by the toaster.bbclass [YOCTO #5604] (Bitbake rev: 4930ff5b471761c2a8d16c1935cdab9cf141d2d8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10bitbake: toaster: move layer information reading codeAlexandru DAMIAN
In the processes of removing local system accesses from toaster UI, we remove the layer data reading code that was moved to toaster.bbclass, and adapt the database writing code to read the data from event sent by the toaster.bbclass [YOCTO #5604] (Bitbake rev: 33b60a940f58e8374a8c7baa9bf28a98f54cdf13) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20bitbake: bitbake: cooker, toaster: mark interrupted builds as failedAlexandru DAMIAN
This patch changes bitbake to log an error to the command line when the build is interrupted via Ctrl-C. This is needed to inform the user that not all tasks required for the build have been executed, and the build is not complete. Internally, the Bitbake server will return a CommandFailed event that will be logged by Toaster as build failure. (Bitbake rev: 9a658e8b1511f1b9f91663f546f748fdfbc8965f) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15bitbake: cooker, toaster: variable definition trackingAlexandru DAMIAN
In order to track the file where a configuration variable was defined, this patch bring these changes: * a new feature is defined in CookerFeatures, named BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING, the base variable definition are tracked when configuration is parsed. * getAllKeysWithFlags now includes variable history in the data dump * toaster_ui.py will record the operation, file path and line number where the variable was changes * toaster Simple UI will display the file path and line number for Configuration page There is a change in the models to accomodate the recording of variable change history. [YOCTO #5227] (Bitbake rev: 78e58fed82f2a71f052485de0052d7b9cca53ffd) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04bitbake: toaster: fixes for null values from eventsAlexandru DAMIAN
Some of the data values may come of as None through the event system, and the UI would encounter a problem saving the Configuration. It would be trying to save these values as NULL in the database, which is not allowed. This patch adds more verification for data coming through the event system. Other minor updates: * update for the event model from toaster.bbclass * minor code flow fix in the event system (Bitbake rev: 03fafd086381723c6486522873671515824e49f2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18bitbake: toaster: add Toaster UI interfaceAlexandru DAMIAN
Adding a new bitbake UI interface named 'toasterui'. 'toasterui' listens for events and data coming from a bitbake server during a run, and records it in a data store using the Toaster object model. Adds a helper class named BuildInfoHelper that reconstructs the state of the bitbake server and saves relevant data to the data store. Code portions contributed by Calin Dragomir <calindragomir@gmail.com>. (Bitbake rev: 62200ff6694b21fbd5abf009a6f47ad93adf5309) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>