Commit Graph

107 Commits

Author SHA1 Message Date
Mathieu Dubois-Briand
ea0077dce7 builders: Rework least loaded worker finding in nextWorker()
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
2025-03-07 14:13:01 +00:00
Richard Purdie
754040f52c builders: Avoid giving jobs to workers that already have them
When giving jobs to workers, we want to prioritise idle ones and only
give them to the busiest ones when there are no others free.

This isn't entirely straight forward as there is no "idle" attribute
for workers but we can use a query and work it out.

Includes fixes from Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-06 12:50:27 +00:00
Richard Purdie
20f12e3576 builders: Fix after reproducible changes
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-05 14:44:18 +00:00
Mathieu Dubois-Briand
421dd04863 builders: Fix configuration for buildbot 4
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
2025-02-10 18:22:57 +01:00
Mathieu Dubois-Briand
02661be391 builders: Add controller url in build tag
Make sure tags created on a-full/a-quick builds are unique, even across
different controller instances.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-07 10:40:25 +00:00
Antonin Godard
afa838d962 docs build: make it possible to override repo settings
In the current form when forcing a docs build, the different repo
parameters do nothing and are not propagated. The properties from
props_for_builder() are propagated, but weren't used in the factory
definition.

So use FixedParameters in the codebases definition: this removes the
useless entries in the form (we cannot simply remove the codebases arg
or it triggers another error "No sourcestamp found in build for
codebase"). Then in config.py, populate the "docs" entry in
buildertorepos, so that these show up in the form. Finally, in the docs
factory build, use Interpolate to get the property (I had issues using
util.Property directly).

Note: in latest buildbot version I hit a known bug
https://github.com/buildbot/buildbot/issues/8274. It shouldn't affect us
since we use an older version of Buildbot, but leaving this here just in
case.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-10 15:43:12 +00:00
Mathieu Dubois-Briand
2078359b30 builders: Create poky tags on a-full or a-quick builds
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-17 15:21:54 +00:00
Mathieu Dubois-Briand
f6a7a67425 builders/config: Use a shorter codebase name for docs
The introduction of codebases for docs builder changed the git clone
steps internal names, as they are now suffixed with the codebase name.
This new name for the yocto-autobuilder-helper seems to be too long for
the database used on our autobuilder and triggers an exception. Use a
shorter codebase name to fix this issue.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-23 15:26:47 +01:00
Mathieu Dubois-Briand
06dfc4e43a builders/config: Fix docs builder with custom branches
While most of the builds on the autobuilder rely on the
shared-repo-unpack helper script and do not use the Buildbot codebases,
the "docs" builder use Buildbot traditional way to setup sources. As a
consequence, we have to use Buildbot codebases, otherwise the same
branch name is used for all cloned repos.

Add the codebase specifications for all three repos used by the docs
builder. Also remove them from the repos list, as these fields are not
used.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-23 11:34:55 +01:00
Richard Purdie
8c7217134a builders: Fix reversed branchname matching logic
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-09 23:50:54 +01:00
Richard Purdie
0094a385c8 builders: Add commented out debugging for bonuses
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-09 21:57:27 +01:00
Richard Purdie
48686d22b9 builders: Allow partial matching of helper branches
Helper branches with names like contrib/kirkstone-nut don't work with
worker restrictions currently. Try and fix this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-07 22:27:30 +01:00
Richard Purdie
fdc1617271 builders: Reduce threshold for /tmp space to 1GB
buildperf-debian11 only has 1.8GB space on /tmp so this was blocking builds.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-08 11:06:13 +01:00
Richard Purdie
12f10fc494 builders: Handle different distro /tmp mount point output
Simplfy the space command to directly use findmnt and output in bytes to simplify the expression.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-05 23:26:51 +01:00
Richard Purdie
d809e29a23 builders: Improve disk space checking
We've been seeing increasing problems with disk space issues breaking builds.

Increase the check from 100GB to 200GB
Monitor /tmp for 10GB free as well
Refactor the code to make adding other mount point checks easy

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-04 12:58:31 +01:00
Richard Purdie
18d01404cc builders: Switch to new qa email scripts name, force updates to helper instead
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28 10:23:29 +01:00
Richard Purdie
5b6624d80d builders: Pass url for build to qa email script
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 12:16:37 +01:00
Alexander Kanavin
adcf9d6143 builders.py: clobber build dir also when the build was cancelled
This enables faster cleanup of cancelled builds, reducing chance
of disk space running out.

[YOCTO #15205]

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-11 15:56:26 +01:00
Richard Purdie
2eb0365c64 builders: Don't reset yp_build_revision if it is already set
This avoids OE-Core builds reseting to an OE-Core revision, cleaning up the
console display.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-25 00:21:34 +00:00
Richard Purdie
f9933d8e14 console_view: Use tags to group builds together
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-23 17:47:04 +00:00
Jate Sujjavanich
0137545c0b observer.py, runconfig.py: Remove NewStyle classes
These classes were removed in buildbot 3.2.x because migration is
complete.

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
2023-03-22 23:20:09 +00:00
Jate Sujjavanich
65ab4fb81e builders.py: Use to SetPropertyFromCommandNewStyle
For buildbot 2.9.x

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
2023-03-22 16:49:16 +00:00
Jate Sujjavanich
de07ef9045 builders.py, observery.py: Convert to *NewStyle
ShellCommandNewStyle

For buildbot 2.9.x migration

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
2023-03-22 16:49:15 +00:00
Richard Purdie
c46984fefa builders: Rather than use a central shared repo dir, use the local build directory
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-27 23:04:44 +01:00
Richard Purdie
e3e148cb4a builders: Avoid errors if sharedrepolocation is unset
Try and avoid errors like:

/bin/sh: 1: cd: can't cd to /poky
0631ddde57c27c25f5729bc0204476f8c7ff826f

for builds without a parent trigger and hence a shared checkout directory.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-27 22:49:19 +01:00
Richard Purdie
1f76afc03f builders: Allow bringup workload on any worker, ignore filters
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-21 20:35:52 +01:00
Richard Purdie
d63c3a4f66 reprodubile: Weight the same as other reproducible builds so it starts earlier
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 08:30:35 +00:00
Richard Purdie
de5263b7be builders: Tweak space limits
Practise is showing 60GB can still let the builders run out of space. Increase
to 100GB and also delay things more to allow better recovery, 2 minutes isn't
a long time when dealing with file deletion.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-12 12:11:57 +00:00
Richard Purdie
8829a85464 builders: Fix function call
Fix a function call typo in previous commit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-31 12:53:36 +00:00
Richard Purdie
7353a843d5 builders: Fix quarantine handling
The way the canStartBuild code was written, it inserted a delay between
each build starting of 2 minutes unconditionally. We only want to do this
if the worker had run out of space so tweak the code accordingly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:07:36 +01:00
Richard Purdie
17c7b35155 builders: Correct bonus application
The bonus is applied to the start time and needs to make the build
appear as if it started earlier than it did since earlier builds are
prioritised. This means the bonus should be subtracted, not added.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 17:54:07 +01:00
Trevor Gamblin
e21c1123a2 builders.py: fix bonus time calculation
Modify the builder_bonuses calculation so that it provides variable
bonus time based on the builder, rather than a constant value.

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-29 16:19:33 +01:00
Trevor Gamblin
fda674dec6 builders.py: Add canStartBuild disk space check
We need a way to limit the builds for when a given worker has less than
a certain amount of disk space available. This implements a
canStartBuild method based on the example in the Buildbot docs and
blocks a build if the worker has less than 60GB of disk space available.
Unlike the example code, we want the stdout of the command so that we
can calculate the amount of disk space, rather than just relying on the
remote command's return code.

Docs: https://docs.buildbot.net/latest/manual/customization.html#canstartbuild-functions

[YOCTO #14591]

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-29 16:19:18 +01:00
Richard Purdie
5f649e42cd builder: Rework builder prioritisation mechanism
The previous idea whilst looking good meant those builders were prioritised
over all others meaning multiple builds running in parallel which would
all be partly complete.

After discussion with upstream, add a bonus weighting mechanism to the
default sorting (which is based upon start time) so that our priority
builds should start first but builds started earlier should still be
prioritised.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-11 22:34:05 +01:00
Trevor Gamblin
b5a047f99f builders: Add prioritizeBuilders
This prioritizeBuilders function sorts builders by the length of their
associated worker lists, so that builders that can only be assigned to a
small number of workers are assigned to those workers before other
builds that don't have specific needs when resources are limited. An
example might be when a slot is available on an Ubuntu-based worker, and
"oe-selftest-ubuntu" and "genericx86-64" build requests exist in the
queue. Since oe-selftest-ubuntu requires an Ubuntu-based worker and
genericx86-64 does not, genericx86-64 will be assigned a higher value
(lower priority) so that oe-selftest-ubuntu is assigned to that worker
first.

[YOCTO #13644]

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-09 14:24:24 +01:00
Richard Purdie
84df87768a builders: Ensure only one docs build runs at a time
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-16 12:12:52 +01:00
Richard Purdie
64b67aa878 Add SPDX License Identifiers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-18 23:49:01 +00:00
Richard Purdie
ccc041a8e8 builders/schedulers: Add 'Should SWAT monitor?' boolean field to build schedulers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-21 14:19:19 +00:00
Richard Purdie
99cafafe1a builders: Cascade the yp_build properties so skipped builds show more cleanly in the UI
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-29 23:51:37 +00:00
Richard Purdie
c8db821860 builders/runconfig: Add ability to skip targets if the don't exist in the branch configuration
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-20 23:36:40 +00:00
Richard Purdie
7898d68ccc runconfig/observer: Simplify log handling for new format tasks
For new tasks, hide errors/warnings if not present, don't monitor steyXY
logfiles as they're no longer needed and ensure description is provided
by our code as shellCommand doesn't handle it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-12 10:29:32 +00:00
Richard Purdie
3a9b218c83 builders: Clean up buildirectories of successful builds
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11 18:07:11 +00:00
Richard Purdie
25d5a7d0ae builders/runconfig: Allow execution of run-config steps individually
Rather than running all the work in a single run-config command, split this into
multiple steps. This allows for separate result code reporting, timestamps
for indvidual steps and is generally much cleaner. The naming and so on will need
further work but this is a start.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11 18:07:11 +00:00
Richard Purdie
97104f0a69 builders: Move run-config handling to its own module
Also abstract the calls into a function to allow for easier further
development.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-10 16:47:16 +00:00
Richard Purdie
0088756388 builders: Add bitbake repository to docs build
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-06 13:32:56 +00:00
Richard Purdie
d81c7ca443 builders/config/schedulers: Add support for 'docs' builder
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-05 12:24:56 +00:00
Steve Sakoman
ad5c6f7089 builders.py: At the end of trigger builds use rm rather than clobber to clean up
Since clobber is crossing two file systems in this case the worker
can delete the files faster than it can move them

Also fixes a occasional race that results in build failures

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-14 21:23:02 +01:00
Richard Purdie
bec33fd671 builders: Add workername parameter to shared-repo-unpack calls
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-27 16:59:33 +01:00
Richard Purdie
452b0255c2 builders: Pass in workername to run-config
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06 14:40:54 +00:00
Richard Purdie
4f990e3f6d builders: Fix string formatting to use Interpolate
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-17 23:21:13 +00:00