Commit Graph

93 Commits

Author SHA1 Message Date
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
Richard Purdie
3204310119 builders: Add a posttrigger component to the build
This means the source mirror check is run a significant time after the source mirror
update allowing the mirroring code to have time to take effect rather than showing
errors on first build runs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-17 16:56:56 +00:00
Richard Purdie
3b290ec6d7 builders: Add randomised nextBuild function
nextWorker  can block a request if there is no worker available.
_getNextUnclaimedBuildRequest will always return the first request
which then will always fail to find worker, and this will block the queue
We therefore randomise the build requests queue with nextBuild to avoid
blocking.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07 11:37:06 +00:00
Richard Purdie
75b4e77973 builders/config: Allow filtering of workers for previous releases
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-06 17:36:03 +00:00
Richard Purdie
b0f684ee64 builders/scheduler: Add ability to select the worker to run on
Thanks to tardyp for the pointer to an example of how to make this work!

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-18 17:15:11 +01:00
Richard Purdie
6079117701 builders: Fix typo
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06 15:42:17 +01:00
Richard Purdie
d87126c419 builders: Use full option parameters to run-config for clarity
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06 14:31:01 +01:00
Richard Purdie
14046de06d builders: Pass build_type parameter to run-config
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06 14:28:02 +01:00
Thomas Goodwin
4447148a5c Bug fix: added support for ABHELPER_JSON environ.
The readme suggests exporting this variable from the
environment to expose multiple configuration JSON files
but the intended behavior doesn't work without adding the
variable to extra_env.

Signed-off-by: Thomas Goodwin <btgoodwin@geontech.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-02 17:36:20 +01:00
Thomas Goodwin
2c765c32d0 builders.py: fix for AB helper repo branch being ignored.
Signed-off-by: Thomas Goodwin <btgoodwin@geontech.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-02 17:34:28 +01:00
Richard Purdie
5d50ac3a33 builders: Add -R option to send-qa-report to pass test results to the script
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21 16:52:07 +00:00
Richard Purdie
8ebe2d26c6 builders: Write test results into testresults subdir
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08 19:49:13 +00:00
Richard Purdie
cc4bc40b28 builders: At the end of triggers builds, cleanup the shared repo directory
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-04 12:39:42 +00:00
Richard Purdie
ba73db0480 builders.py: Filter the list of properties we're passing to triggered builds
This reduces unnecessary properties being set in builds where we don't need
them by filtering to the list of repos the build really needs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:48:49 +00:00
Richard Purdie
9315359ffb builders.py: Don't hardcode the url to the autobuilder-helper
Use the standard list of repos we already have instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:47:59 +00:00