summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: Added new feature to import eventlogs from command line ↵Marlon Rodriguez Garcia2023-12-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | into toaster using replay functionality Added a new button on the base template to access a new template. Added a model register the information on the builds and generate access links Added a form to include the option to load specific files Added jquery and ajax functions to block screen and redirect to build page when import eventlogs is trigger Added a new button on landing page linked to import build page, and set min-height of buttons in landing page for uniformity Removed test assertion to check command line build in content, because new button contains text Updated toaster_eventreplay to use library Fix test in test_layerdetails_page Rebased from master This feature uses the value from the variable BB_DEFAULT_EVENTLOG to read the files created by bitbake Exclude listing of files that don't contain the allvariables definitions used to replay builds This part of the feature should be revisited. Over a long period of time, the BB_DEFAULT_EVENTLOG will exponentially increase the size of the log file and cause bottlenecks when importing. (Bitbake rev: ab96cafe03d8bab33c1de09602cc62bd6974f157) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Update orm.models to catch error ProcessLookupErrorAlassane Yattara2023-11-091-3/+2
| | | | | | | | | - catch error ProcessLookupError and logs it (Bitbake rev: a61a5f47dc56daafa9089adaad388b3c0b59155d) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update selenium version and code syntaxMarlon Rodriguez Garcia2023-10-061-1/+1
| | | | | | | | | Updated selenium version to latest 4.13.0, changed selenum specific version syntax elements to accomplish test success (Bitbake rev: 868c88a249ef4b9fe5a891e76e25e054e4fcd994) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: import only used layersDavid Reyna2023-08-301-14/+14
| | | | | | | | | | | | | | | If you import a build directory, Toaster still adds openembedded-core, meta-poky and meta-yocto-bsp to the newly created project. Toaster should only be including in the project the layers that it imported. [YOCTO #13764] (Bitbake rev: e73c4d7685a3bd6b806a8f1a3600a3a86266f0b6) Signed-off-by: Kieran McNulty <Kieran.McNulty@windriver.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm/models -- drop django.utils.sixTim Orling2022-03-151-1/+0
| | | | | | | | | Django 3.2 no longer has django.utils.six module. (Bitbake rev: ae03c1f05e37f70e72a2ac08f7c718b8fc4fc36e) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix IMAGE_INSTALL issues with _append vs :appendRichard Purdie2022-03-111-1/+1
| | | | | | | | | | | | | | | After the override syntax change, toaster isn't working correctly. This is because it uses IMAGE_INSTALL_append instead of IMAGE_INSTALL:append. This tweaks the code accordingly to fix this. I have a suspicion that exiting toaster databases may struggle with the change and there are some migration steps missing for the whole overrides syntax change step. (Bitbake rev: befc93c3e03a9b1a2b630cd5badcda756fe6cd28) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc/lib: Update to use new override syntax containing colonsRichard Purdie2021-08-021-1/+1
| | | | | | | | | | This runs the overrides conversion script in OE-Core over the bitbake code base including the docs. A handful of things were excluded in toaster and for the Changelog file. (Bitbake rev: 47f8d3b24fd52381bf3b41e2f55a53e57841344c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: migrate to Django-2.2David Reyna2020-03-291-49/+49
| | | | | | | | | | | Toaster migration to Django-2.2. Django-1.x has been deprecated. [YOCTO #13207] (Bitbake rev: 9730f95686b2ac72cf1fa513c555f7c7787e2667) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: amend code to use proper singleton comparisons where possibleFrazer Clews2020-01-191-2/+2
| | | | | | | | | | | amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Sync list of fs_types with oe-coreDaniel Ammann2019-07-271-5/+5
| | | | | | | (Bitbake rev: 1dddfe3512b6390958abb91b21f074568ae4e8db) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Strip old editor directives from file headersRichard Purdie2019-05-041-3/+0
| | | | | | | | | | There are much better ways to handle this and most editors shouldn't need this in modern times, drop the noise from the files. Its not consitently applied anyway. (Bitbake rev: 5e43070e3087d09aea2f459b033d035c5ef747d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-12/+0
| | | | | | | | | | With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-041-0/+2
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bad link for distro conf fileDavid Reyna2018-10-181-1/+1
| | | | | | | | | | | | The distro source path link is missing "conf/distro/", and the display is using the machine link instead of the distro link. [YOCTO #12957] (Bitbake rev: e43ff061b03878057e49c44aa3ee2e4c7a5d5503) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: custom image enable layer add, protect pre-cloned layersDavid Reyna2018-10-041-2/+2
| | | | | | | | | | | | | | | When creating custom image recipes, the layer add for new layers needs missing xhrLayerUrl data. Also, code is needed to check and inform user if the newly added layer has not been cloned yet, and provide helpful error message instead of the current frozen dialog. [YOCTO #12887] (Bitbake rev: b310031972a53d0881a87a627f07bdcf7d9c6b79) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/models.py: allow local paths for custom recipe's baseAwais Belal2018-08-281-0/+7
| | | | | | | | | | | | | | | In a case where the layer source is local only and the recipe is not yet built, we can search for the path with layer's local_source_dir, and if available that should be used rather than just skipping the scenario. [YOCTO #12891] (Bitbake rev: 59f3e04122fca43835603779ac2d201464fbaebf) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Implement the project-specific feature and releated ↵David Reyna2018-08-201-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enhancements and defects. Here is the primary driving enhancement: * Bug 12785 - Support Project Specific configuration for external tools (e.g. ISS, Eclipse) - Isolated project-specific configuration page (full Toaster context hidden) - Support for new project, reconfigure existing project, and import existing command line project - Ability to define variables (e.g. image recipe) and pass them back to external GUI - Ability to execute the cloning phase, so that external GUI receive a buildable project - Ability to call back to the external GUI when updates are completed and ready - Compatibility of above projects with the normal full Toaster interface - Ability to pass to a 'complete' or 'cancel' web page so that the external GUI can immediately stop that Toaster instance, and not leave dangling servers nor edit sessions open Here are the supporting enhancements, where at least the back end is implemented: * Bug 12821 - Make Toaster conf changes compatible with command line usage * Bug 12822 - Support importing user changes to conf files into Toaster * Bug 12823 - Support importing user build directories into Toaster * Bug 12824 - Scan imported layers for content so that they are immediately available * Bug 12825 - show layer clone item in progress bar Here are defects fixed: * Bug 12817 - builddelete.py requires explicit 'add_arguments' * Bug 12818 - Remove orphaned imported layers when project is deleted * Bug 12826 - fix imported layer management * Bug 12819 - build using selected bitbake env, not Toaster's env * Bug 12820 - Toaster randomizes the layer order in toaster_bblayers.conf [YOCTO #12785] (Bitbake rev: 985d6cec290bdd80998a63483561a73c75d82d65) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: custom image updates and original creationDavid Reyna2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | When Toaster removes a package from a custom image, it must also always remove the advised reverse-dependent recipes. Similarly, when adding a package it must always add its advised the packages it depends on. This code must be un-indented so that it applies to all respective added or removed packages. Toaster normally waits until a new custom image is built before creating the custom layer and the recipe. However, an intermediate different build can fail because the recipe has already been added to the project, so the image's default recipe must be created when the image is created. [YOCTO #11915] (Bitbake rev: bcd68fd7231f166baff875fb88e4f9ce0d9bf91d) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move to new bitbake xmlrpc defaultDavid Reyna2017-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The bitbake option "-t SERVERTYPE" was deprecated and can be removed since the desired XMLRPC listener now the default. The bitbake server port cannot be "-1" anymore and must be explicitly passed. There is a race condition for the bblock file to not only be created but to actually be populated, so a delay test loop is required (usually only one pass). The 'xmlrpcclient' is now the class that allows Toaster to for example kill builds. The events for populating the recipe parsing now either show only the final result or are skipped entiredly, so the progress calculator needs to be changed to not block on the parsing phase. [YOCTO #11851] (Bitbake rev: 2aa7ad38f760ec003fb18faa5aa0014cff191a7a) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: set clone progress default to offDavid Reyna2017-07-211-2/+2
| | | | | | | | | | | | | | Set the clone progress to be off by default for the benefit of command line projects and 'Local Yocto' builds. For Toaster managed projects that do use the clone feature the clone progress status is already explicitly set by the existing code and thus displayed. [YOCTO #11744] (Bitbake rev: d25a3088150b2a277242027c12becdeb88c45517) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: include setscene in task progressDavid Reyna2017-07-211-3/+4
| | | | | | | | | | | | | Change the task progress counting from the task order field which excludes setscene to the task completion field which counts all completed tasks regardless of type. [YOCTO #9971] (Bitbake rev: 485b328430dcdfd0b52f09f01ebd490d09459ea3) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: test 'commit' first in get_vcs_referenceDavid Reyna2017-06-281-2/+2
| | | | | | | | | | | | | | The 'commit' value should be tested and used first when resolving the ref for a layer, since that is an explicit override in each layer index 'layeritem' record. If should take precedence over more-global 'branch' and 'release' values, instead of being last. [YOCTO #11515] (Bitbake rev: b303365ca3a1ba5fb8c6839180f1ec26df60c6ce) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add distro selection supportDavid Reyna2017-06-281-0/+31
| | | | | | | | | | | | | | Add the ability to select a distro in the project page, based on values from the Layer Index. Add a distro selection page with the add layer feature, based on the add machine page. [YOCTO #10632] (Bitbake rev: a156a4eff67cdc3943494f5be72b96e3db656250) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: git clone progress barDavid Reyna2017-06-281-0/+15
| | | | | | | | | | | | | | If a project has a lot of additional layers, the build may appear to hang while those layers are checked out. This patch adds a clone progress bar that is visible before the parsing progress appears. [YOCTO #9916] (Bitbake rev: 0c94d947b74c4dee23d7b9d255facd3cf839ccbe) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: get_last_build_id not called correctlyDavid Reyna2017-06-221-6/+6
| | | | | | | | | | | | | The method "get_last_build_id" missing the "()" in several calls. This has been failing silently with Django 1.8 but intermittently crash with Django 1.9. [YOCTO #11570] (Bitbake rev: c29e137a6e65317b8a36804126511c2137878715) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster: add wic.bmap support to toasterSujith H2017-02-151-1/+1
| | | | | | | | | Add wic.bmap file extension support for toaster (Bitbake rev: 6a3f6f1b5cc9ec69b28bebf70daed7579c60cd9e) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: models Layer_Version get_detailspage_url optional project_idMichael Wood2016-12-121-1/+7
| | | | | | | | | | | | | Allow passing none as the project id, this is convenient for layers which belong to projects already and therefore have their own project field. Add documentation string to function (Bitbake rev: 78dc7b9f1801e7f4c266ba1369e5706f177ddaa1) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: models Layer fix whitespaceMichael Wood2016-12-121-1/+1
| | | | | | | (Bitbake rev: 8116cb4f71de09eff124cd48d80cc7a7c64da5e1) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm models Handle CustomImageRecipe BRLayer hereMichael Wood2016-11-301-21/+37
| | | | | | | | | | | | | | The schedule_build function on the project object is where the BRLayers are created for the build. Instead of creating the BRLayer for the CustomImageRecipe in the localhostbbcontroller create it here so that all that mechanism is in one place. Also fix a number of pyflake errors. (Bitbake rev: f8d3ea784937b6e416d3e5a4feb1283c478e4caa) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm models Project class Fix pyflake errorsMichael Wood2016-11-301-8/+12
| | | | | | | (Bitbake rev: 69f33397083f54f977fa0cd4dd621731f32fd034) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper toaster-custom-images layerMichael Wood2016-11-301-1/+2
| | | | | | | | | | | | | | | | | | | This fixes the unidentified layers issue by making the toaster-custom-images layer a local layer. By doing this we also fix the git assumptions made for the local layers which stop recipes and other meta data being associated with them. This also removed some of the special casing previously needed when we didn't have the concept of a local (non git) layer. Also rename created flag var to a have a different var for each returned value so that the same value isn't used multiple times. [YOCTO #10220] (Bitbake rev: ba5332d4960d7f4f79aef63136796e2fa67284e3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm gen_layerdeps Protect against circular Layer dependenciesReyna, David2016-11-301-4/+9
| | | | | | | | | | | | | | Limit the recursion (to say 20 levels) when processing layer dependencies so that circular dependecies do not cause infinite decent and an out-of-memory failure. The duplicate found layers are already immediately filtered in the code. [YOCTO #10630] (Bitbake rev: e9efef0bdb8068984c3013b87aac9e872ffb38ae) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use current directory if BUILDDIR is not setEd Bartosh2016-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If BUILDDIR environment variable is not set signal_runbuilds function throws TypeError as os.getenv('BUILDDIR') returns None: ERROR: unsupported operand type(s) for +=: 'NoneType' and 'str' Traceback (most recent call last): File "bitbake/lib/bb/ui/toasterui.py", line 391, in main buildinfohelper.update_build_information(event, errors, warnings, taskfailures) File "bitbake/lib/bb/ui/buildinfohelper.py", line 1184, in update_build_information self.internal_state['build'], errors, warnings, taskfailures) File "bitbake/lib/bb/ui/buildinfohelper.py", line 238, in update_build_stats_and_outcome signal_runbuilds() File "bitbake/lib/toaster/orm/models.py", line 1746, in signal_runbuilds '.runbuilds.pid')) as pidf: File "/usr/lib64/python3.4/posixpath.py", line 82, in join path += b TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str' Used os.getenv('BUILDIR', '.') to make it always return meaningful directory path. Current directory '.' will be used if BUILDDIR is not set. (Bitbake rev: da631152a0db3f432709a05ff15a268d784ca3ab) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm models Handle run builds process not yet runningMichael Wood2016-11-041-2/+6
| | | | | | | | | | | | During tests we may want to call the runbuilds process manually for example when doing a "one shot" approach rather than a long running process during tests. (Bitbake rev: 60d3f93836da5523705b0b2e25567d1c9040ec89) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: notify runbuilds when build status changesEd Bartosh2016-09-211-0/+2
| | | | | | | | | | | | | Called signal_runbuilds API when build is scheduled, cancelled or finished to notify runbuilds process about builds status change. [YOCTO #8918] (Bitbake rev: fe08f0fa4b328908e73695ebbceca87bc86a49f9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: implement signal_runbuilds functionEd Bartosh2016-09-211-1/+7
| | | | | | | | | | | | | This function reads pid of runbuilds process from BUILDDIR/.runbuilds.pid and sends SIGUSR1 to it. signal_runbuilds function will be used in Toaster code to notify runbuilds when build is scheduled, finished or cancelled. (Bitbake rev: 62955224a6d99e9f581d2bef924058070bfa4c43) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Update IMAGE_FSTYPES valuesBelen Barros Pena2016-09-081-3/+4
| | | | | | | | | | | | | | This patch fixes a typo in one of the IMAGE_FSTYPES values listed in Toaster. It also updates the hardcoded list of values to match the latest list in meta/classes/image_types.bbclass [YOCTO #9447] (Bitbake rev: 46db3279cb81b3ca6ce047204aee620f5ee51220) Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bldcontrol model BRLayer Add corresponding local_source_dirMichael Wood2016-08-111-1/+9
| | | | | | | | | | | | Sync the BRLayer object with the new field added to the Layer object. The BRLayer (BuildRequest Layers) are snapshots of the layers in the project at build time and therefore need to mirror the required fields of the layer object. (Bitbake rev: a3112c922f036425977abffa0137b9133f61fcd6) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add local_source_dir field to modelSujith H2016-08-111-0/+1
| | | | | | | | | | | | | | | Add a new field local_source_dir to model. This will clearly differentiate us from the vcs_url which is for git path. Adding migration file 0010_layer_local_source_dir_path.py along with this patch. [YOCO #9911] (Bitbake rev: 83763d89f9d0bc535e930a2094ba8201675d40be) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix unhandled exceptionEd Bartosh2016-08-111-2/+2
| | | | | | | | | | | | | | manage.py lsupdates throws DataError exception if the recipe can't be saved to the MySQL database: django.db.utils.DataError: (1406, "Data too long for column 'license' at row 1" Adding DataError exception to the list of exceptions should make lsupdates to print a warning message and skip the recipe. (Bitbake rev: 01891c13ae8dcba64e5cf79956f1b64c2afdaae3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add started property to BuildElliot Smith2016-08-111-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Add a property to the Build model which records whether the BuildStarted event has occurred for the build. The proxy for this event is the presence of variables recorded against the Build: as the buildinfohelper only saves variables when the BuildStarted event occurs (as the variables aren't available on the bitbake server before that point), we can tell whether BuildStarted has happened by counting Variable objects on the Build. This can then be used to determine whether a Build "properly" started, enabling a different dashboard display (left-hand menu hidden) if the build didn't record any useful information (e.g. if it had a bad target). [YOCTO #8443] (Bitbake rev: aa151a4d2de4a54fe3075a8c56a4935158398a18) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show "Tasks starting..." until the first task completesElliot Smith2016-08-111-0/+13
| | | | | | | | | | | | | | | To prevent showing a "0% of tasks complete" message for a long time, don't show the progress bar until the first task has finished. While waiting for that first task, show a message about tasks starting instead. [YOCTO #9631] (Bitbake rev: 5529bcd860d2932b967a064ae28690ac5a725342) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show progress of recipe parsing in recent builds areaElliot Smith2016-08-111-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] (Bitbake rev: f33d51d46d70e73e04e325807c1bc4eb68462f7b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move most recent builds templating to clientElliot Smith2016-08-111-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most recent builds area of the all builds and project builds table needs to update as a build progresses. It also needs additional functionality to show other states (e.g. recipe parsing, queued) which again needs to update on the client side. Rather than add to the existing mix of server-side templating with client-side DOM updating, translate all of the server-side templates to client-side ones (jsrender), and add logic which updates the most recent builds area as the state of a build changes. Add a JSON API for mostrecentbuilds, which returns the state of all "recent" builds. Fetch this via Ajax from the build dashboard (rather than fetching the ad hoc API as in the previous version). Then, as new states for builds are fetched via Ajax, determine whether the build state has changed completely, or whether the progress has just updated. If the state completely changed, re-render the template on the client side for that build. If only the progress changed, just update the progress bar. (NB this fixes the task progress bar so it works for the project builds and all builds pages.) In cases where the builds table needs to update as the result of a build finishing, reload the whole page. This work highlighted a variety of other issues, such as build requests not being able to change state as necessary. This was one part of the cause of the "cancelling build..." state being fragile and disappearing entirely when the page refreshed. The cancelling state now persists between page reloads, as the logic for determining whether a build is cancelling is now on the Build object itself. Note that jsrender is redistributed as part of Toaster, so a note was added to LICENSE to that effect. [YOCTO #9631] (Bitbake rev: c868ea036aa34b387a72ec5116a66b2cd863995b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: admin Add Layer_Version to the admin-able modelsMichael Wood2016-07-261-0/+11
| | | | | | | | | | | | | | If the migration didn't get the release conversion right for say, a local or imported layer it would be handy to be able to edit this in the django admin page. Also useful for developers to be able to tweak layers on the fly. (Bitbake rev: 0b23b6919ef1162a0c7fb5b5a961a24653c51eb2) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Remove the layerindex specific up_branch fieldsMichael Wood2016-07-261-24/+8
| | | | | | | | | | | | | | | | | | We don't need to keep track of layerindex data in our database. And using branch==release is very confusing in the schema. Instead use the existing Release definition to keep track of which release a layer_version is for. Remove the Branch model and all references to it. Create a migration path to convert from up_branches to their corresponding releases. (Bitbake rev: f8f4cffe6fd371f3a7e63690c68f3fcb5dc1f297) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Replace references to LayerSource modelsMichael Wood2016-07-261-0/+8
| | | | | | | | | | | Replace references to the now deprecated layersource models across Toaster with the new enums for layer source types. (Bitbake rev: 48c09c62eb979d840132e58144f0d81ffee675b1) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: models Remove LayerSource models and replace with enumMichael Wood2016-07-261-378/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | We had a lot of complexity around different layer sources to allow for multiple sources and different priorities for these source. This was implemented using rigged abstract classes which represented the different layer sources when in fact just an enum/flag on the layer_version object is sufficient for our needs. Remove the LayerSourcePriority object as this is not needed. We no longer have a problem of multiple layers coming from multiple sources so this is not needed. Two migrations are added to first remove the child models which represented layersources. Then a second migration is needed to remove the LayerSource model it's self as Django can't understand the non-standard base class dependency. Triggering this issue: https://docs.djangoproject.com/en/1.8/topics/migrations/#dependencies Clean up a number of flake8 warnings in classes which were modified. [YOCTO #9853] (Bitbake rev: 26624740418de95adb1f4a970a30a5f1149ebb79) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: the customise image button shouldn't rely on targetsElliot Smith2016-07-191-8/+3
| | | | | | | | | | | | | | | | | | The build dashboard customise image button (for creating a new custom image based on an image recipe used by a build) shouldn't rely on targets: whether a new custom image can be created or not depends on whether any of the recipes used by the build are image recipes. Modify the method used to determine whether a build has customisable images to look at the image recipes used during the build, rather than whether the targets run by the build refer to image recipes. (Bitbake rev: 6648876c91134bda8498b4f8d7ace9147ec0d985) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add package manifest path to Target objectsElliot Smith2016-07-191-3/+5
| | | | | | | | | | | | | | | | | | | Store the path to the *.rootfs.manifest file for targets which generate images. A link to the package manifest is displayed in the build dashboard for targets which produce image files. Like the license manifest path, if a target would have produced the package manifest (but didn't, because it already existed), that path is copied from the target which did produce the package manifest. (Bitbake rev: 79b8e349a0da2ea6b97ad82daa5837e6dfffe0af) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>