Commit Graph

834 Commits

Author SHA1 Message Date
Ross Burton
4918f445ba config.json: add meta-oe to the metrics target
This writes the metrics to a new yocto-metrics-meta-oe repository, and
write the results to patchmetrics-meta-oe.

There's a great/ugly (delete to taste) hack to hide CVEs from oe-core,
so this only lists issues in meta-oe.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-31 15:01:57 +00:00
Ross Burton
2954d78759 Rewrite metrics-gathering scripts
Rewrite the scripts that gather the metrics to be more generic.

Extract the metrics repository cloning out so that we don't have to
repeatedly clone it.

Make the scripts parse their arguments using getopt and be more specific
about what they're passed.  In particular, this means that for the patch
review run we pass the _repository_ that we're scanning so we can do git
operations on it, and the base of the _layers_ (either a layer, or a
directory containing layers) so we know what to scan.

Be more clever when identifying what commits we need to analyse for
patch review: instead of iterating through a set randomly, we can keep
the revision list sorted and the checkout operations are a lot faster.

Remove the commit/file count metric addition as patchreview itself does
that now.

Add an explicit --push option so it's easy to test the scripts in
isolation without pushing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-31 15:01:57 +00:00
Tim Orling
be76b6a5e4 scripts: add list-yp-compatible-layers.py
This is a handy helper script to query the Buildbot REST API to
create a list of Yocto Project Compatible 2.0 layers, as defined by
successful running of the "check-layers*" jobs.

The script only considers the 'jobs' ("Builders" in Buildbot speak) you
ask it to query.

The script looks at the latest -n successful builds for a branch that
matches from a list. The number of builds approach was used because
the property_list cannot be queried for "branch" in the "builders" API.

It looks for a "step" name pattern via a regex, with which all currently
running "check-layer" and "check-layer-nightly" jobs conform.

Once a branch has successfully been queried, it is removed from the list
in further iterations. The intent is to only find the latest passing
list of compatible layers, for each branch.

The output is a yp_compatible_layers.json file which can
be pretty printed with:

cat yp_compatible_layers.json | jq

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-29 22:40:32 +00:00
Alexander Kanavin
fd985c1842 config.json: use '-S lockedsigs' to generate the locked signatures file
This is now done with a dedicated switch, where previously the file was always written
out, creating often unneeded clutter.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 10:54:03 +01:00
Alexander Kanavin
d922eff893 config.json: add a standalone builder for running yocto mirror tests
Those tests are currently run as the last step in a-full/a-quick,
but it's useful to also trigger them separately, after perhaps
executing other builders that populate the mirrors (such as
qemux86-64 and such).

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-27 09:56:04 +01:00
Richard Purdie
4a11b0ff5e config.json: patchtest fix auto layer handling
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 14:37:06 +01:00
Richard Purdie
28b4157a98 config.json: meta-patchtest needs meta-oe
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 14:30:47 +01:00
Richard Purdie
8adcaa5fac config.json: meta-patchtest needs meta-python
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 14:25:58 +01:00
Richard Purdie
711b38598f config.json: Add patchtest build
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 14:22:33 +01:00
Richard Purdie
a489d8a338 config.json: pipewire is no longer a dependency of agl-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-26 09:27:03 +01:00
Richard Purdie
1e23b73452 SECURITY.md: Add file
Add a SECURITY.md file with hints for security researchers and other
parties who might report potential security vulnerabilities.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-24 12:58:24 +01:00
Richard Purdie
93d47af8ab config.json: Make meta-oe source mirror config wider coverage
Some recipes depend on DISTRO_FEATURES, commercial licensing or compiler
config like fortran. Set these things so that we get wider soruce mirror
coverage and fewer warnings.

'commercial' license usage is ok here since we're not building and then
shipping any binaries or using it, only mirroring the source code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-24 12:01:19 +01:00
Richard Purdie
f7cac565b4 scripts/run-cvecheck: Remove branch iteration
Rather than running multiple checkouts, lets move this to the autobuilder
to handle and have it trigger the builds with the right checkouts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 16:43:24 +01:00
Richard Purdie
cfdd2d7737 scripts/run-patchmetrics: Only monitor master branch
We only monitor the master branch for patch metrics as we can't really make
improvements to release branches.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 16:43:20 +01:00
Richard Purdie
b2f39bf490 metrics: Pass branchname to scripts
To prepapre to run the scripts per branch, pass the branchname to the scripts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 16:25:51 +01:00
Richard Purdie
dba803bdb2 scripts/run-patchmetrics: Split out CVE checks
Split the CVE checks from the patch metrics script

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 16:22:37 +01:00
Richard Purdie
2da59d3191 scripts/run-patchmetrics: Only clone metrics if it isn't present
To prepare for splitting things up, only clone the metrics repo if it isn't present.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 16:18:28 +01:00
Richard Purdie
eb49969aa8 config.json: Fix check-layer for meta-poky/meta-yocto-bsp
Currently, the tests for meta-poky and meta-yocto-bsp were malfunctioning.
We need to a) set a distro other than poky and b) avoid the isolation wrapper
since it will use the default environment and reset to the poky distro and
default bblayers.conf which will disable the layer test.

With those two fixes, the layer checks work correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-21 10:18:35 +01:00
Ross Burton
5f6adb86bf config.json: Add very basic testimage for poky-tiny
Now that the _qemutiny test case actually works, we can ensure that all
of the tested poky-tiny machines actually at least boot.

This is a very low bar, but it's better than nothing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-20 16:14:14 +01:00
Alexander Kanavin
3fcfef9a12 config.json: use yocto-mirrors tag to exclude/include yocto source mirror test
This way explicitly listing the test can be avoided, especially when more tests
of the same kind will be added (such as te CDN sstate cache mirror test).

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-20 13:53:56 +01:00
David Pierret
cc2a3f6a53 meta-oe-mirror: Use a 2 step job to fetch and verify meta-openembedded mirror.
Inspired from trigger-build and trigger-build-post-trigger
The branch must be selected on build configuration.

Signed-off-by: David Pierret <david.pierret@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-19 10:03:18 +01:00
Yoann Congal
6f48f65c68 config.json: add a workaround for the "autobuilderlog.json" error
For the reproducible-meta-oe builder, workaround the bug #15241 [1], by
passing BB_LOGCONFIG through "readlink -f" to avoid relative reference
to the main build dir.

Also, switch from BBPATH to BUILDDIR to reference the main build dir.

[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15241

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-18 23:50:13 +01:00
Fabien Thomas
725d459afc config.json : Fix repro-meta-oe layer dependency
Fix meta-filesystem build issue due to hidden dependencies (not set by
LAYERDEPENDS) smbnetfs(meta-filesystem) depends on
samba(meta-networking) that depends on python3-dnspython (meta-python)

Create new build-st dir for each layer to avoid chain of
failure between steps

Signed-off-by: Fabien Thomas <fabien.thomas@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-14 18:42:19 +01:00
Fabien Thomas
f15fa98bc7 config.json : reproducible-meta-oe build fixes
- Distro has been changed to Poky so exclude Poky's layers from world to
limit reproducibility tests to the targeted layer only.
- Execution on autobuilder shows that addlayer steps often fail :
reorder layer in ADDLAYER list regarding their dependencies.
- Fix shortid building issues by setting USERADD_U(G)ID_TABLES to
passwd and group files. These files must exist in meta-openmbedded.
- Shorten the steps shortnames to improve readability on UI.
- Add a directory level for output reports, for convenience.

[RP: Tweak shortnames and fix parsing issues]
Signed-off-by: Fabien Thomas <fabien.thomas@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-10 14:13:36 +01:00
Michael Halstead
e274d71300 config.json: Pull using ssh:// instead of git://
git:// is less performant than https:// and ssh://. We are using ssh://
to ensure we have the very latest commits. The public mirrors may have a
30 second delay while they sync.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-08 09:10:14 +01:00
Richard Purdie
a4c2b0baab config.json: reproducible-meta-oe fixes
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-05 20:42:25 +01:00
Fabien Thomas
551334fb19 config.json: add reproducible-openembedded build
The purpose of this new builder is to report the reproducibility status
of all meta-openembedded recipes layer by layer. It use the same
reproducible selftest than OE-Core but setting only world as target,
and excluding all oecore and other openembedded layer recipes.
Also, the report output directory is split by layers.

Signed-off-by: Fabien Thomas <fabien.thomas@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-05 17:39:59 +01:00
Alexis Lothoré
76c6b3644c scripts/send_qa_email: guess latest tested revision when dealing with branch
It has been observed that some regression reports generation may failed
when the comparision base is a branch (e.g master) because we can not find
any test results associated to the branch HEAD. This is especially true for
branches which often change, because not all revisions on those branch are
subject to CI tests.

To fix that, whenever we are not dealing with a release, parse the latest
tested revision in test results repository on target branch in order to
guess the corresponding revision in poky repository, so we are sure that
revisions passed to yocto_testresults_query are indeed tested and
regression report can be generated

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:39:50 +01:00
Alexis Lothoré
c70cb948c6 scripts/send-qa-email: define tests results repository url only once
Test results repository url is used at least twice, so define a constant
holding the url instead of hardcoding it multiple times

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:39:50 +01:00
Alexis Lothoré
44650c9681 scripts/send_qa_email: re-clarify base and target revisions
There are some inversions in words used to describe elements of comparison
for regression reporting: the main function of send_qa_email starts using
"base" to talk about the target revision and "compare" to talk about the
reference against which it is compared. Then later in the script, the
"base" is used as "base of comparison"/reference revision, while the
"target" branch/revision appears. This becomes quite confusing when we need
to update the script

Re-align wording to avoid confusion:
- always use "target" to talk about current branch/revision of interest
  (the newest)
- always use "base" to talk about the reference branch/revision  (the
  oldest), against which we want to compare the target revision

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:39:50 +01:00
Richard Purdie
2a5b2722d0 scripts/send_qa_email: Add missing global to allow exitcode to work
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-27 16:40:37 +01:00
Richard Purdie
5e4d2ffaae scripts/send-qa-email: Add URL of build to QA email
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 12:03:43 +01:00
Richard Purdie
9d39add273 qa_email: Ensure we set an error exit code for errors
Whilst the script needs to continue if we fail to generate a regression report,
set the exit code accordingly so our CI can flag the issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 11:16:39 +01:00
Richard Purdie
c0202368a1 qa_email: Add headers to the script to improve debugging
It is hard to tell which section of the code specific error messages
come from at present. Add more headers to the output so we can at
least tell which section the messages are from. It also adds some
timing information.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 11:11:01 +01:00
Richard Purdie
95fcf44498 config.json: Drop most core-image-minimal-dev image tests and add core-image-full-cmdline
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:48:29 +01:00
Richard Purdie
2b55cef850 config.json: Consolodate oecore test steps
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:45:57 +01:00
Richard Purdie
0d5f87cfba config.json: Drop now unneeded SDKMACHINE settings
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:42:52 +01:00
Richard Purdie
9a0299657a config.json: Prefer x86_64 SDKMACHINE to i686
The i686 SDKMACHINE target makes little sense now, reduce it's usage substantially to
match use in reality and make x86_64 the default.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:39:22 +01:00
Richard Purdie
37cc97f283 config.json: Set SDKMACHINE explicitly
SDKMACHINE defaults to i686 for historical reasons but it should no longer be the main
thing we test. Start to improve things by setting things by everywhere explicitly so
we can then rationalise to what makes sense.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:30:15 +01:00
Richard Purdie
a588034f3e config.json: Reduce testing on qemumips/qemumips64/qemuppc
Introduce the concept of "qemu lite" and reduce the testing on these platforms,
mainly with the removal of core-imaege-sato-sdk.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 17:29:06 +01:00
Ross Burton
44945df7b5 config.json: add generic-arm64/poky-altcfg build
We want to promote generic-arm64 to meta-yocto-bsp in the future, so
start testing this more comprehensively.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-06 23:18:45 +01:00
Alexander Kanavin
af5d072a65 auh-config: systemd now requires usrmerge
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15 21:20:32 +01:00
Richard Purdie
136efab119 config.json: systemd now requires usrmerge
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-10 20:20:26 +01:00
Alexis Lothoré
d3c671d545 scripts/test_utils.py: update test after BUILD_HISTORY_DIRECTPUSH removal
Update getcomparisonbranch unit tests by removing BUILD_HISTORY_DIRECTPUSH
entry in fake configuration

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-26 16:27:11 +01:00
Alexis Lothoré
f54329cf35 config.json: remove BUILD_HISTORY_DIRECTPUSH
Now that BUILD_HISTORY_DIRECTPUSH has been replaced by a hardcoded
condition, remove it from config.json

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-26 16:27:11 +01:00
Alexis Lothoré
c2afe19aba scripts/utils.py: replace BUILD_HISTORY_DIRECTPUSH with hardcoded condition
It has been observed that when a new release branch is created, it is quite
easy to forget to update the BUILD_HISTORY_DIRECTPUSH variable, which leads
to failures in autobuilder like test results not being pushed.
Replace the BUILD_HISTORY_DIRECTPUSH usage with a hardcoded condition which
validates any branch in poky representing a "main" branch, i.e all branches
not ending in "-next"

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-26 16:27:11 +01:00
Trevor Gamblin
1f059e36c0 ab-janitor: only rm trashdir files over 60s old
[YOCTO #14952] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=14952

Help avoid contention by adding a check to ensure files and directories
are at least 60s old when attempting to delete them from the trashdir,
in case bitbake or another process is still actively using them.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15 14:36:11 +01:00
Alexis Lothoré
2f6ee29e0b config.json: add mickledore as direct push branch for test results
Now that mickledore is released, builds are executed on mickeldore release
branch. If not properly described in config.json, it will be considered a
"work" branch, and as a consequence test results will not be pushed onto
test results git repository
Add mickeldore entry in config.json to fix test results storage

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-14 17:18:04 +01:00
Alexis Lothoré
9175dbb2bb scripts/send-qa-email: print warning when test results are not stored
Tests results push command depends on basebranch and comparebranch
variables, which are computed based on config.json content. If this file is
not in sync with current release branch, tests results will be properly
stored in git directory but not pushed onto test results server. Since we
are able to detect this scenario, print at least a warning, without
breaking current build since it could be a release

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-14 17:18:04 +01:00
Alexis Lothoré
8345af15e8 scripts/send-qa-email: use logger instead of raw prints
As for other scripts in yocto-autobuilder-helper or oecore, use python
logger class instead of raw print calls to allow log level distinction

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-14 17:18:04 +01:00