summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-10-16codeparser: replace deprecated ast.Str and 's'yocto-4.32023-10-nanbield2.6.0Chris Laplante
These have been deprecated since 3.8 Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16Toaster: Fixed javascript issue on tests.browser.test_js_unit_testsAlassane Yattara
- Update /toastergui/static/js/projectpage.js to fix following javascript issue that make fail test_js_unit_tests. Uncaught TypeError: Cannot read properties of null (reading 'name') Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16Toaster: Bug-fix failure on tests.browser.test_layerdetails_pageAlassane Yattara
Call wait_until_visible before send_keys to be sure inputs is visible otherwise we get followings error: selenium.common.exceptions.WebDriverException -> Message: element not interactable Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16toaster: bug-fix on tests.browser.test_most_recent_builds_statesAlassane Yattara
Fixed errors that make test_most_recent_builds_states failed. Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16toaster: fixed functional testMarlon Rodriguez Garcia
Updated functional test file to fix url access and added waiting time after click operations to allow following elements to be available for tests, this will needed to be revisited when autobuilder is ready Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16toaster: update jquery version 2.0.3 -> 3.7.1Marlon Rodriguez Garcia
Updated jquery version from 2.0.3 to 3.7.1 https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-reliable-table-row-dimensions/ Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16toaster: Update bootstrap version to 3.4.1Marlon Rodriguez Garcia
Update bootstrap version to 3.4.1 to fix incompatibility issues and security vulnerabilities Files base, base_specific and js-unit-test were updated to match new versions of files Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-16toaster: updated bootstrap version 3.3.6 -> 3.3.7Marlon Rodriguez Garcia
Updated bootstrap from version 3.3.6 to 3.3.7 to fix compatibility errors https://github.com/twbs/bootstrap/issues/16834 Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-15fetch2: Add API for upstream source tracingAlberto Pianon
This patch adds an API to bb.fetch2 to enable users to plug in an unpack tracer that can trace each source file back to its corresponding upstream source url, even when multiple upstream sources are combined together in the same unpack directory. This may be required for software composition analysis, license compliance, and detailed SBoM generation. This patch provides only the needed hooks in bb.fetch2 code and a dummy abstract class defining the API; users may load their own unpack tracer class by setting the BB_UNPACK_TRACER_CLASS config parameter. Signed-off-by: Alberto Pianon <alberto@pianon.eu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-15Update toaster-requirements to add django-log-viewer==1.1.7Alassane Yattara
Django Log Viewer allows us to read & download log files in the admin page by using DataTables Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09bitbake-hashclient: Add clean-unused subcommandJoshua Watt
Adds a subcommand to clean unused outhash entries from the server based on age Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09hashserv: Add API to clean unused entriesJoshua Watt
Adds an API to remove unused entries in the outhash database based on age and if they are referenced by any unihash Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06hashserv: Extend get_outhash API to optionally include unihashJoshua Watt
Extends the get_outhash API with a flag indicating whether to include the unihash in the output. This is means that the query doesn't require the unihash entry to be present to return a result Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06bitbake-hashclient: Add remove subcommandJoshua Watt
Adds a subcommand to invoke the remove API on the server Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06hashserv: Add remove APIJoshua Watt
Adds a `remove` API to the client and server that can be used to remove hash equivalence entries that match a particular critera Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06selftest/fetch: Ensure top level directory timestamp doesn't break testRichard Purdie
The infrastructure changes highlighed an issue where the top level directory mtime stamp isn't included in the tarballs. This isn't an issue the test is meant to check for so ignore it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-05toaster: Monitoring - implement Django logging systemAlassane Yattara
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-03toaster: update selenium version and code syntaxMarlon Rodriguez Garcia
Updated selenium version to latest 4.13.0, changed selenum specific version syntax elements to accomplish test success Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-27bitbake-getvar: Treat undefined variables as empty with --valuePeter Kjellerstedt
Rather than outputting the string "None" for undefined variables, output only a linefeed (the same as for variables that are defined to the empty string). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-27bitbake-getvar: Add a (suppressable) error for undefined variablesPeter Kjellerstedt
If an undefined variable or variable flag is specified, bitbake-getvar will now fail with an error message indicating this. The error can be supressed with --ignore-undefined, which matches the previous behavior. This also changes the errors related to specifying --flag or --unexpand without --value so that they are sent to stderr rather than stdout. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake: cooker: add a new function to retrieve task signaturesJulien Stephan
adding a new command in cooker to compute and get task signatures this commit also add the associated command and event needed to get the signatures using tinfoil Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26fetch2: Adds vscode devcontainer supportMatthias Schnelte
Visual studio code is injecting a git credential helper into every dev container. This helper is forwarding the git credentials from the host into the container. In order for this helper to work the REMOTE_CONTAINERS_IPC needs to be available in the environment for all git operations that require authentication. Signed-off-by: Matthias Schnelte <develop@schnelte.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake/lib: spawn server/worker using the current Python interpreterRoss Burton
The user may have invoked ./bin/bitbake using a different Python interpreter than whatever python3 is on $PATH (for example, explicitly using a different version). However, as the server and workers are spawned directly they'll use the hashbang and thus a different Python. We also ensure that argv[0] is set to sys.executable instead of 'bitbake-server' or 'bitbake-worker', so that sys.executable is set to the right value inside the child. Without this the server won't be able to start any workers. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake-getvar: Make --value imply --quietPeter Kjellerstedt
It does not make any sense to get log output from bitbake-getvar when the --value option is used as the log output is sent to stdout and thus interferes with the output of the variable's value. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26bitbake-getvar: Make --quiet work with --recipePeter Kjellerstedt
Initializing Tinfoil with setup_logging = False only has an effect when recipe parsing is not needed. To make it work regardless of if --recipe is used, manipulate the quiet parameter to Tinfoil.prepare() instead. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26tinfoil: Do not fail when logging is disabled and full config is usedPeter Kjellerstedt
If Tinfoil is initialized with setup_logging = False and Tinfoil.prepare() is called with config_only = False, then it fails because self.localhandlers is only initialized when setup_logging = True. This is seen with, e.g., `bitbake-getvar -q -r busybox MACHINE`: Traceback (most recent call last): File ".../bitbake/bin/bitbake-getvar", line 41, in <module> tinfoil.prepare(quiet=2) File ".../bitbake/lib/bb/tinfoil.py", line 390, in prepare for handler in self.localhandlers: AttributeError: 'Tinfoil' object has no attribute 'localhandlers'. Did you mean: 'oldhandlers'? Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22codeparser: Update debug variable referenceRichard Purdie
The code has changed and the debug message didn't work. Fix it. The output is still incredibly useful. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22bitbake-worker/runqueue: Avoid unnecessary bytes object copiesEtienne Cordonnier
declaring queue=b"" creates an object of types bytes(). bytes() is an immutable object, and therefore doing "self.queue = self.queue + r" creates a new object containing "self.queue" concatenated with "r". On my test setup, we are passing 180MB of data of "workerdata" to the bitbake-worker, so those copies significantly slow down the initialization of the bitbake-worker. Rather use bytearray() which a mutable type, and use extend() to avoid copies. In my test setup, byterray.extend() is 10.000 times faster than copying the queue, for a queue size of 180MB. Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-19data: Add missing dependency handling of remove operatorInsu Park
A recipe variable handles its dependencies even on the "contains" variables within the "inline Python expressions" like bb.utils.filter(). And it also handles those in the append operator correctly, but the problem is that it does not so in the remove operator. Fix it by adding the missing dependencies every time the remove operator has been handled. Also add a test case to check if the override operators handle dependencies correctly. Signed-off-by: Insu Park <insu0.park@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18cooker: Drop unneeded flush callsRichard Purdie
Since the flush calls have significant effects for bitbake timeout issues, drop the remaining ones from cooker. These aren't in as critical paths as the other issues but it makes sense to clean up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18server/process: Disable the flush() call in server loggingRichard Purdie
We've been chasing bitbake timeouts for a while and it was unclear where things were blocking on IO. It appears the flush() call in server logging can cause pauses up to minutes long on systems with slow (spinning) disks that are heavily loaded with IO. Since the flush() was added to aid debugging of other timing issues, we shouldn't need it now and it can be disabled. Leave a comment as a reminder of the pain this can cause. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-18lib: Drop inotify support and replace with mtime checksRichard Purdie
With the flush in serverlog() removed and a memory resident bitbake with a 60s timeout, the following could fail in strange ways: rm bitbake-cookerdaemon.log bitbake-layers add-layer ../meta-virtualization/ bitbake-layers add-layer ../meta-openembedded/meta-oe/ bitbake -m specifically that it might error adding meta-oe with an error related to meta-virt. This clearly shows that whilst bblayers.conf was modified, bitbake was not recognising that. This would fit with the random autobuilder issues seen when the serverlog flush() call was removed. The issue appears to be that you have no way to "sync()" the inotify events with the command stream coming over the socket. There is no way to know if there are changes in the IO queue which bitbake needs to wait for before proceeding with the next command. I did experiment with os.sync() and fsync on the inotify fd, however nothing addressed the issue. Since it is extremely important we have accurate cache data, the only realistic thing to do is to switch to stat() calls and check mtime. For bitbake commands, this is straightforward since we can revalidate the cache upon new connections/commands. For tinfoil this is problematic and we need to introduce and explict command "revalidateCaches" that the code can use to force bitbake to re-check it's cache validity. I've exposed this through tinfoil with a new "modified_files" function. So, this patch: a) drops inotify support within bitbake's cooker/server and switch to using mtime b) requires a new function call in tinfoil when metadata has been modified Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14fetch2: git: Use path_is_descendant() instead of path for repo checkJoshua Watt
Using path prefixes to check if the git directory is a descendant of the clone directory can be easily confused with symlinkes and bind mounts, causing directories to be deleted unnecessarily. Instead, use bb.utils.path_is_descendant() which is immune to the these sorts of problems. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-09-14utils: Add path_is_descendant()Joshua Watt
Adds a utility that checks if one path is an descendant of another. This check uses os.path.samestat() to make it immune to symlinks and bind mounts. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-09-10bitbake: Update to 2.6.0 release series/versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-05server/process: Add more timing debugRichard Purdie
It is helpful to have timestamps on the ping failures so that they can be matched against the bitbake logs. It is also useful to understand how long the server takes for form a reply verses when it is sent. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-05runqueue: show number of currently running bitbake threads when pressure changesMartin Jansa
* it might be a bit confusing as it shows number of threads before making the decision to start more tasks and also it can show only a few tasks running, but not because of pressure when there just aren't many tasks left or wait for their dependencies to be finished first * example output: NOTE: Pressure status changed to CPU: True, IO: None, Mem: None (CPU: 297589.5/200000.0, IO: 5522.2/None, Mem: 779.2/None) - using 7/8 bitbake threads NOTE: Pressure status changed to CPU: False, IO: None, Mem: None (CPU: 196381.2/200000.0, IO: 2667.9/None, Mem: 556.2/None) - using 2/8 bitbake threads Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-05doc: bitbake-user-manual: remove reference to SSTATE_MIRRORS variableMichael Opdenacker
This variable is implemented in OE-Core, and therefore only documented in the Yocto Project manual. Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-05doc: Document challenges of tags with git fetcherRichard Purdie
Using tags with the git fetcher may cause surprising behaviour. There are reasons for this, document them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02fetch2: git: Remove useless try..else clauseJoshua Watt
There is no reason to have the else clause in this try block, as it can be moved into the try block, which is clearer. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02command: Avoid time intensive distractions for pingRichard Purdie
We noticed some users were seeing very slow ping response times which caused 'server timeout' issues. There were some function calls in runCommand which could be slow such as the inotify callback processing. Mark up the ping command such that it doesn't need configuration information, it is allowed on a readonly server and specifically skip the inofity processing too since ping would never need that. This will hopefully resolve various ping timeout issues that were being reported. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-02README: Update to point to new contributor guideRichard Purdie
Now we have a contributor guide combining various wiki pages, point at that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29toaster: accommodate missing 'Image Name' value in buildinfohelperDavid Reyna
The value "Image Name" in bitbake events was missing for certain builds. Update 'buildinfohelper' to extract the image name elsewhere in this circumstance and not crash. [YOCTO #13191] 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>
2023-08-29toaster: import only used layersDavid Reyna
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] 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>
2023-08-29toaster: Update to Django 4.2David Reyna
Update Toaster to support Django 4.2, to match current hosts and to address CVEs. [YOCTO #15152] 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>
2023-08-25fetch2: git: Check if clone directory is a git repoJoshua Watt
If the clone target directory exists and is a valid git repo, but the git directory is not a child, it needs to be erased and re-cloned. One example of how this can happen is if a clone creates the directory, but then fails to actual clone and make it a git repository. This left-over directory can be particularly problematic if the download directory is a descent of some top layer git repo (e.g. the default with poky), as the commands that operate on the remote later will then mangle the layers git repository instead of the download git repo. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2023-08-25gitsm: tolerate git-lfs in submodulesRandolph Sapp
Explicitly pass down the lfs parameter from the source repo URI to submodules. Add smudge skip to final checkout phase to make sure we don't access the network here. Everything should have been fetched and setup from the lfs logic in the git fetcher at this point. Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-08-25Fix disk space monitoring on cephfsSamantha Jalabert
Error occured while running bitbake on cephfs: WARNING: The free inode of path is running low (-0.001K left) ERROR: Immediately halt since the disk space monitor action is "HALT"! Signed-off-by: Samantha Jalabert <samantha.jalabert@syslinbit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24lib/bb: Add xattr and acl librariesJoshua Watt
Adds Python wrappers around the xattr API from libc and the ACL API from libacl. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-24runqueue: show more pressure dataMartin Jansa
* with latest bitbake I'm seeing very low number of bitbake tasks executed in parallel, probably due to pressure regulation show the values this is based on in the note * also simplify a bit by counting the pressure and exceeds signs only once Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>