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>
Michael Wood [Fri, 6 Feb 2015 19:22:49 +0000 (19:22 +0000)]
toaster: New build button allow arbitrary build targets
Target input field needed to support both selecting suggestions and
typing targets, since Toaster doesn't always know about all the targets
provided by the layers in the project.
[YOCTO #7187]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Fri, 13 Feb 2015 15:53:34 +0000 (15:53 +0000)]
toaster: layerdetails use new vcs reference api
Use the new layer_version api so that we return the vcs reference whether
that be the commit hash, branch name or the upstream branch to which the
layer is associated with.
[YOCTO #7192]
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Alexandru DAMIAN [Tue, 10 Feb 2015 16:25:17 +0000 (16:25 +0000)]
toaster: properly detect failed server start
This patch brings in reading the server log if the server
fails to start. This is the first step in displaying the errors
in a manner that is actionable by the user.
[YOCTO #7285]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Aníbal Limón [Fri, 13 Feb 2015 21:58:11 +0000 (15:58 -0600)]
fetch2: wget latest_versionstring improvments in get version by dir
Add support for scan every version directory using _check_latest_version
makes code more robust because sometimes upstream projects publish
new directories without files, causing don't find version.
To support this new behaviour remove _check_latest_dir and replace for
_check_latest_version_by_dir,
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Aníbal Limón [Fri, 13 Feb 2015 21:58:10 +0000 (15:58 -0600)]
fetch2: wget add _check_latest_version_by_dir
Add _check_latest_version_by_dir this function provides support
for scan every directory newer than current dir in order to get
latest_versionstring, example:
Change return of _vercmp from True/False to -1/0/1 to provide test
when current directory is equal to newer directory this helps to
scan the same directory to get minor versions, example:
Add support for get group only if exist in regex, this enables to use
this function in _check_latestversion regardless if the regex is generic
or specified by REGEX_URI.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton [Tue, 10 Feb 2015 18:13:25 +0000 (18:13 +0000)]
cooker: rework LAYERDEPENDS versioning so that it is actually useful
We've had versioned dependency support in LAYERDEPENDS for quite a long
time, but I can say with pretty good certainty that almost nobody has
used it up to now because it was too strict - the specified version had
to exactly match the version in your configuration or you would get an
error; there was no "greater than or equal" option, which is usually
what you will want given that LAYERVERSION does get bumped from time to
time.
However, users mismatching layer branches and then having their builds
fail later on with some incomprehensible error is still a pretty common
problem. We can't simply use the git branch because not everyone is
always on a branch and the branch names don't always match up (and
that's not an issue). To provide a practical means to address branch
mismatching, I have reworked LAYERDEPENDS version specifications to use
the more familiar "dependency (>= version)" syntax as used with package
dependencies, support non-integer versions, and clarified the error
message a little. If we then take care to bump the version on every
breaking change, it is at least possible to have layers depend on these
changes when they update to match; we can now even support a major.minor
scheme to allow retrospectively adding a version limiter to old branches
when a new branch is created and yet still allow the old branch minor
version to be bumped if needed.
Fixes [YOCTO #5991].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton [Tue, 10 Feb 2015 18:13:24 +0000 (18:13 +0000)]
tests: add tests for OE pre-release version formatting
This scheme is used for versioning recipes that are pre-release (alpha,
beta, etc.) within OpenEmbedded, so add some tests to ensure the
appropriate comparison results still hold true.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton [Tue, 10 Feb 2015 18:13:23 +0000 (18:13 +0000)]
utils: ensure explode_dep_versions2 raises an exception on invalid/missing operator
We really want an error rather than the version to just be silently
skipped when the operator is missing (e.g. "somepackage (1.0)" was
specified instead of "somepackage (>= 1.0)".)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Removed a note to myself in the BB_ORIGENV example.
Reported-by: Paul Eggleton <paul.eggleton@intel.com> Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Wood [Thu, 5 Feb 2015 18:19:57 +0000 (18:19 +0000)]
toaster: all Machines exclude de-prioritised layer source items
If a duplicate layer exists from another layer source and provides a
machine we don't want to show it if that layer comes from a low priority
layer source.
Signed-off-by: Michael Wood <michael.g.wood@intel.com
Michael Wood [Thu, 5 Feb 2015 14:24:01 +0000 (14:24 +0000)]
toaster: models Allow the machine's layer name to be searched
Make the layer name searchable. If you know the name of the layer you are
interested in, searching for it is a fast way of getting the list of
machines provided by it.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Wed, 4 Feb 2015 18:06:30 +0000 (18:06 +0000)]
toaster: All machines Add filtering based on layer in project
Add a filter so that we can filter machines which are already being provided
by a layer in the current project.
Also make sure that we're only showing layers which are compatible with
the current project.
Also handle no results returned and page heading reflecting the number of
results returned from a search.
AlexD solved conflicts while merging the patch.
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Michael Wood [Tue, 3 Feb 2015 16:08:47 +0000 (16:08 +0000)]
toaster: layerdetails Don't remove alert from dom on dismissal
When dismissing the alert we actually want to keep the alert area still
in the dom for the use of future alerts. The default behaviour is to
remove it from the dom. Hide it again instead.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Tue, 3 Feb 2015 16:05:15 +0000 (16:05 +0000)]
toaster: All machines Update layer notifications
Update layer notifications to the new wording for layer add remove
notifications.
Fix bug where the the alert area is being removed from the dom on
dismiss instead of re-hidden
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Fri, 30 Jan 2015 18:21:05 +0000 (18:21 +0000)]
toaster: Add add/select functionality to machines page
This feature for the machines page allows the user to add a layer and
it's dependencies to the current project and then if successful select
the machine(s) which become available due to being provided by the
layer.
AlexD merged the changes into the submission queue.
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: add the word 'compatible' to 'all' pages
Labels for the 'all' pages don't really convey what's provided in them.
The team has suggested we add the word 'compatible' to them,
to make clear they will show all layers / targets / machines that
can be built with the version of the build system you are
using in a certain project. A link like 'view all targets'
becomes 'view all compatible targets'.
I've also added some help text.
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>