Dave Lerner [Wed, 11 Mar 2015 20:05:08 +0000 (15:05 -0500)]
toaster: layer-relative paths for config files
Change bitbake variables table to show the path to the file in which
the variable was defined using a layer-relative path instead of the
full path to the file.
The layer-relative path is found by matching on the full defining file
path with entries in a list of layer names, sorted in descending order,
and with 'meta' appended as a built-in layer to the end of the list.
Additional filters are used to reduce false matches, although even if
there is a false match, the actual path to the defining file will be
obvious and not misleading.
[YOCTO #7414]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
David Reyna [Thu, 12 Mar 2015 23:56:12 +0000 (16:56 -0700)]
toaster: insure IMAGE_INSTALL_append values have a space prefix
When the IMAGE_INSTALL_append value is not empty, it must have a space prefix
in order for the "append" operator to concatenate the values correctly, so we
enforce it in this variable's submit javascript.
[YOCTO #7394]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Michael Wood [Fri, 13 Mar 2015 15:22:32 +0000 (15:22 +0000)]
toaster: tasks trigger the select related tables before ordering
In two of the cases the data is changed from a QuerySet to a sorted list
so we aren't able to use the QuerySet api at this point, moving it
before the data type is changed fixes this.
[YOCTO #7404]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Fri, 13 Mar 2015 14:34:41 +0000 (14:34 +0000)]
toaster: Add cancel build to latest build section
Add this functionality to the common managed_mrb_section
Make sure we are using the correct version of this template in the
projects template and remove now redundant code.
[YOCTO #7351]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Dave Lerner [Thu, 12 Mar 2015 18:55:27 +0000 (13:55 -0500)]
toaster: leave cancel enabled for release change
When you click the 'change' icon to edit the project release, the
"cancel" button, should always be enabled so that the user can
return to the 'not editable' state at any time.
[YOCTO #7151]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Alexandru DAMIAN [Tue, 10 Mar 2015 18:31:45 +0000 (18:31 +0000)]
toastergui: dirinfo needs path separation
In the dirinfo URLs we use the "/" separator for directory
separation which coincides with the "/" separator in HTTP URIs.
This is not a problem, but we must not have consecutive "/"
characters as the web servers will conflate those - we add
a "_" delimitator to separate the Django managed URL from the
dirpath parameter, while maintaining the unique ID of REST urls.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: improve performance in the all targets page
This patch improves performance in the all targets display
by computing the preffered layer only for displayed targets,
instead of computing for all targets.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
We modify the project page to provide a consistent view of the
build errors. The display is now similar with the
managed_mrb_section and links point to the buildrequest
detail view.
[YOCTO #7188]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Paul Eggleton [Mon, 16 Mar 2015 10:35:10 +0000 (10:35 +0000)]
bitbake-layers: use stdout instead of stderr for logging
We use logger.plain() to produce actual output which needs to go to
stdout. We could use more advanced filtering (and probably should in
future) but for the moment let's just fix the regression.
Fixes [YOCTO #7458].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Tue, 10 Mar 2015 10:29:46 +0000 (10:29 +0000)]
cooker/server: Fix up 100% CPU usage at idle
The recent inotify changes are causing a 100% cpu usage issue in the
idle handlers. To avoid this, we update the idle functions to optionally
report a float value which is the delay before the function needs to be
called again. 1 second is fine for the inotify handler, in reality its
more like 0.1s due to the default idle function sleep.
This reverts performance regressions of 1.5 minutes on a kernel build
and ~5-6 minutes on a image from scratch.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The following workflow (whether accidentally or deliberately) would
previously not result in a checksum error, but would be helpful to do
so:
- Write a recipe with correct checksums
- Fetch the sources for this recipe using bitbake
- Change the checksums
Since the bitbake fetcher writes a done stamp after the initial download
and does not verify the checksums again (even if they are changed in the
recipe afterwards), the change of checksums is silently ignored.
Fix this without the overhead of computing the checksums from scratch on
every do_fetch by storing them in pickled format in the done stamp and
verifying that they still match those in the recipe.
Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Dave Lerner [Thu, 5 Mar 2015 23:01:55 +0000 (17:01 -0600)]
toaster: cached outcome download button
When a task is executed successfully without using saved-state cache,
then a button appears allowing the user to download the log file for
that task. This commit allows the user to download the log file for a
task that is completed by unpacking data from the saved-state cache, a
task with outcome 'Cached'. The same button 'Download task log' is
shown, which when pressed downloads the '_setscene' log file for that
task.
[YOCTO #7379]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Michael Wood [Mon, 2 Mar 2015 15:00:49 +0000 (15:00 +0000)]
toaster: Enforce unique layer names
We had some clever functionality to manage duplicate layer names by
using layer versions and new revisions, unfortunately this was too
opaque to the user.
[YOCTO #7337]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Dave Lerner [Wed, 25 Feb 2015 20:53:22 +0000 (14:53 -0600)]
toaster: commit id format on layers page
On the layers page, when a layer revision is a commit id instead of a
an upstream branch name, then follow the same format for displaying the
commit id as on the recipes page. That format is a button with the
truncated commit SHAID which when pressed expands to the full SHAID.
[YOCTO #7191]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: bring back base URLs for pages that need them
Some URLs, although invalid on their own, are used in JS to
build valid page pointers. Previous patch removed two of these URLs,
breaking the display of several patches.
This patch re-adds these URLs with different names, and returns
400 Bad Request empty pages on them, which is consistent with the
intended usage of these URLs.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
David Reyna [Fri, 27 Feb 2015 03:46:23 +0000 (19:46 -0800)]
toaster: hide special code for core vars not present, disable add button
Hide the special config variable management sections when the respective
variables are not present. Disable the variable add button after a
variable is added so that blank values cannot be added, and also when a
variable name managed in the project detail page (e.g. BBLAYERS and MACHINE)
is entered.
[YOCTO #7246]
[YOCTO #7371]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Dave Lerner [Thu, 26 Feb 2015 20:29:23 +0000 (14:29 -0600)]
toaster: layer rev tooltip only if necessary
On the heading for the layer detail page, only show a tool tip on the
heading revision branch/shaid field if the string is too large to fit
in the 13 character field. That is, don't show a hovering tool tip
with exactly the same string that is shown without the tip.
[YOCTO #7312]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Dave Lerner [Tue, 24 Feb 2015 22:14:41 +0000 (16:14 -0600)]
toaster: add sort, search, paging to recipe package page
When selecting the packages tab on a recipe detail page, the page now
includes:
column sort on package name and size columns,
search on the package name, and
pagination.
Column sort is added by splitting the recipe view/html for a recipe's
package list into a new url path, view name and template, so that
the sorting routine, views.reload_params(), interfaces similar to other
views.
Search, sorting, and pagination are implemented for this detail page
using three new templates.
templates/detail_pagination_bottom.html
templates/detail_search_header.html
templates/detail_sorted_header.html
views.recipe() is optimized since the recipe's package list is no
longer needed by the recipe template, only the recipe's package count
is required for the first page.
The recipe view and template also changes to support tabbing to the
right context on the recipe detail page from the recipe-package page.
[YOCTO #6154]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Alexandru DAMIAN [Mon, 23 Feb 2015 19:24:58 +0000 (19:24 +0000)]
cooker: read file watches on server idle
The inotify facility monitoring changes to the config files
could be overwhelmed by massive changes to the watched files
while server is running.
This patch adds verification the notification watches to the
server idle functions, in addition to the cooker updateCache
command which executes only infrequently, thus preventing
overflowing the notification buffer.
[YOCTO #7316]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Alexandru DAMIAN [Thu, 26 Feb 2015 21:41:58 +0000 (21:41 +0000)]
toasterui: do not use transactions if the database autocommits
Some databases, notably the SQLite3 adapter, force autocommits even if
the autocommit is turned off. The behavious is tracked in this bug:
http://bugs.python.org/issue8145#msg109965
Django refuses to work with autocommit off in this case, so we have
to take the same precautions when using manual transaction support.
[YOCTO #7363]
[YOCTO #7365]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alexandru DAMIAN [Thu, 26 Feb 2015 21:41:57 +0000 (21:41 +0000)]
toaster: order layers with same priority
When we have multiple layers with the same priority, we
need to order them by date, newest first. The layer version
ID is a complete ordering by recent-ness, so it is suitable.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alexandru Damian [Tue, 24 Feb 2015 17:20:58 +0000 (17:20 +0000)]
toastergui: performance improvements in task details page
This patch brings better forward and reverse dependency computing in
tasks page (offloading python code to the database), as well as
replacing the recursive depth-first covered-by tree search with
breadth-first search.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toasterui: improving the latest builds consistency
We have 2 pages where we have a 'latest builds' section:
the 'all builds / all projects' page and the 'project'
page. Unfortunately, we are currently using different
code base in both, which means that some inconsistencies
between the two in behaviour and presentation have sneaked
in.
This patch addresses some of such inconsistencies.
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The revision label was missing the projec-form class (which
controls the spacing in the form), and the revision text
field was a bit too long, so changed it from span4 to
span3.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chong Lu [Fri, 20 Feb 2015 17:52:43 +0000 (17:52 +0000)]
bitbake-layers: add ability to fetch layers and their dependencies from layer index
Add a command to query layer dependencies from a layer index such as the
OpenEmbedded Layer Index at http://layers.openembedded.org. Fetches the
layer and its dependencies and adds them into conf/bblayers.conf.
[YOCTO #5348]
Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton [Fri, 20 Feb 2015 17:52:41 +0000 (17:52 +0000)]
bitbake-layers: refactor to use argparse instead of cmd
This makes help formatting and option handling a lot more standardised
and allows us to drop a bunch of code. We also gain slightly more
straightforward error handling.
One side-effect however is that the old subcommand syntax using
underscores is no longer supported. The dashed form has been supported
(and displayed in the help text) for quite a while now so I wouldn't
imagine that will be much of an issue.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Wood [Wed, 18 Feb 2015 15:18:51 +0000 (15:18 +0000)]
toaster: importlayer Remove description input field
This wasn't required or working due to a typo and adds ambiguity between
the summary and description. The correct method for changing the description
or summary is via the layerdetails page.
[YOCTO #7190]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
In debug mode, we show the Toaster version and mode in the
top bar. Display them inside a tooltip that appears when
you hover over a nice info icon to make them less conspicuous.
Michael Wood [Wed, 18 Feb 2015 15:09:44 +0000 (15:09 +0000)]
toaster: layerdetails Don't show None type in description/summary
When the result for the summary or description is None don't output the
result as the string version of None, use an empty value so that the
"Not set" mechanism works.
[YOCTO #7244]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Alexandru DAMIAN [Tue, 17 Feb 2015 17:24:29 +0000 (17:24 +0000)]
toasterui: UI query performance improvements
We reduce the number of queries by using "select_related"
to bring in more data in a single query. Improvements in
project page refresh, recipes table and tasks table.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Alexandru Damian [Tue, 17 Feb 2015 15:02:26 +0000 (15:02 +0000)]
toasterui: fix time estimation in project page
This patch fixes the time estimation to build completion
in project page. Additionally it fixes the Most Recent Builds
section used in various pages in managed mode, and proper
time to build estimation in all pages.
[YOCTO #7004]
Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Alexandru DAMIAN [Mon, 16 Feb 2015 17:47:07 +0000 (17:47 +0000)]
toaster: bitbake cooker log saving and downloading
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]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Alexandru DAMIAN [Fri, 13 Feb 2015 13:08:26 +0000 (13:08 +0000)]
toasterui: empty state for pages
Toaster needs to properly prompt the user and display
actionable help texts when the database is void of
meaningful information. This patch brings in the
"empty" states for pages.
[YOCTO #6755]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Michael Wood [Thu, 12 Feb 2015 15:08:24 +0000 (15:08 +0000)]
toaster: Remove Layer source from machines, layers and targets
From the bug: The layer source reveals too much of the implementation model,
without explaining what is going on behind the scenes. It will confuse more
than inform, so let's get rid of it.
[YOCTO #7302]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>