Commit Graph

834 Commits

Author SHA1 Message Date
Richard Purdie
78ca7fb97b archive_buildstats: Only create dirs if we have data
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-13 11:42:30 +01:00
Richard Purdie
b1e2db6640 collect-results: Only create dirs if we have data
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-13 11:39:07 +01:00
Richard Purdie
9ada77ab57 scripts/generate-testresult-index.py: Add back data.json generation
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-12 23:11:51 +01:00
Richard Purdie
da2c03a6cb scripts/generate-ptest-logs: Fix typo
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-12 18:04:21 +01:00
Richard Purdie
9dc1462c0b scripts/generate-testresult-index: Add a cache and locking
Add a cache to improve performance and allow old index entries to be reused.

Also add locking so only one copy of the script can run at once.

Fix the path to the index template to be more stable in different execution environments.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-12 17:55:21 +01:00
Richard Purdie
a21238acab scripts: Split ptest log extraction to separate script
The ptest extraction should really happen separately to the index generation,
move it to do so.

Add code to only consider directories changed in the last 7 days to make
the script faster.

Add an indexing target to config.json to trigger the script.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-12 17:13:34 +01:00
Ross Burton
60e2011f34 scripts: rebase before pushing patch and CVE metrics
There's a chance that run-cvecheck and run-patchmetrics fail to push
because the remote repository has changed. Try to resolve this by pulling
and rebasing immediately before the push, and failing if we can't rebase.

[ YOCTO #15529 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-12 12:41:54 +01:00
Richard Purdie
0e304514dd config.json: Allow AUTOBUILDER_HASHSERV to be more easily changed
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-10 19:53:56 +01:00
Richard Purdie
cfb0661023 config.json: OpenSUSE 15.5 and 15.6 have old python
We need buildtools on these distros as the python version is still 3.6.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-10 18:06:31 +01:00
Ross Burton
e37f202d6c config.json: add a builder for meta-webosose
Add a minimal (although still substantial) build of meta-webosose for LG.
Because meta-webosose has complex layer appends and dependencies we need
to manually set BBFILE_PRIORITY and rewrite bblayer.conf to match what
their custom build scripts currently do.

Builds against oe-core master are known to not work at present, but this
will be backported to kirkstone which is the latest supported release.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-10 13:09:48 +01:00
Alexis Lothoré
9852c7da33 scripts: send_qa_email: do not try to generate a regression report when missing base and/or target
Fixes [YOCTO 15503]

When running autobuilder onm a testing or stable branch, the following
exception may occur:

Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 278, in <module>
    send_qa_email()
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 207, in send_qa_email
    generate_regression_report(querytool, targetrepodir, regression_base, regression_target, tempdir, args.results_dir, log)
  File "/home/pokybuild/yocto-worker/a-full/yocto-autobuilder-helper/scripts/send_qa_email.py", line 93, in generate_regression_report
    regreport = subprocess.check_output([querytool, "regression-report", base, target, '-t', resultdir])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.11/subprocess.py", line 1883, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

This issue is due to base and target revision being None, but subprocess
module do not tolerate arguments being None,

Prevent the script from even trying to generate a regression report if we
are missing some info about revisions to compare.

Cc: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 13:11:49 +01:00
Alexis Lothoré
9e961637ba scripts: test_send_qa_email: fix broken tests
Commit 1dc77f5908 ("scripts: send_qa_email: add dry-run mode") updated
the get_regression_base_and_target to allow it to receive a test result
url. Unfortunately, this function's tests have not been updated
accordingly, so they currently fail because of the missing parameter.

Add a default url in test case and update the function call with this
default value.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 13:11:49 +01:00
Alexis Lothoré
dac3e4cc06 scripts: send_qa_email: fix invalid regex syntax warning
When send_qa_email is executed with python >= 3.12, the following warnings
are emitted:

/home/alexis/src/yocto_ci/yocto-autobuilder-helper/./scripts/send_qa_email.py:22: SyntaxWarning: invalid escape sequence '\d'
  p = re.compile('\d{8}-\d+')
/home/alexis/src/yocto_ci/yocto-autobuilder-helper/./scripts/send_qa_email.py:67: SyntaxWarning: invalid escape sequence '\/'
  tested_revision = re.match('refs\/tags\/.*\/\d+-g([a-f0-9]+)\/\d', latest_test_tag).group(1)

This warning has been introduced to replace the DeprecationWarning
initially raised on such escape code in string regex. Python 3.12 changelog
([1]) states that raw string must be used in this case. Update both
send_qa_email and its tests file.

[1] https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 13:11:49 +01:00
Alexander Kanavin
65b4cd2aae config.json: use private DL_DIR for AUH runs
AUH can produce broken recipes that can't complete do_fetch, and
this results in removal of files in DL_DIR, which races with
other builds, as seen here:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15540

[YOCTO #15540]

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 11:11:36 +01:00
Alba Herrerías
ede8311127 scripts/generate-testresult-index.py: index of autobuilder test results improvements
- Added pico.css to make CSS improvements
- Added filters to the table for better readability of the test results. Filters were added for build type, branch and date
- Added pagination, which improved the performance of the website
- The html index template has been added as a separate file for better maintainability

Co-Authored-By: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-07 17:00:11 +01:00
Richard Purdie
1032badfbb config.json: Drop BB_HASHSERVE_MAX_PARALLEL - removing the code
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-30 23:06:27 +01:00
Richard Purdie
7ab82b6f36 config.jsno: Disable parallelism for now to test
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-27 17:40:02 +01:00
Richard Purdie
2be4e7b192 config.json: Correct typo and allow eSDK upstream hashserve
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-27 17:38:02 +01:00
Richard Purdie
ac752439c4 config.json: Reduce hashserv parallelism as server can't cope
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-25 23:10:53 +01:00
Richard Purdie
f453829855 config.json: Set BB_HASHSERVE_MAX_PARALLEL
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-24 23:57:42 +01:00
Yoann Congal
0a724db87b config.json: Repro meta-oe: clobber build directory to save disk space
This patch clobbers each of the meta-openembedded/meta-* repro selftest
build directory after a successful reproducibility step and should
decrease maximum disk space used by this builder.

Previously, the full parent build directory would only be clobbered
after a successful full build (which is yet to be seen).

As a reminder, each reproducibility build directory contains 2 builds:
* for each recipe of the layer (and their recursive dependencies)
* without rm_work
* one with sstate, one without
As a result, I'd expect to find 10 times a build directory for each
recipe near the root of the dependency tree (linux-yocto, gcc, ...):
one for each meta-openembedded/meta-* layer. This would add up quick.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 18:04:08 +01:00
Ross Burton
d64248abae config.json: add sbsa-ref builds to meta-arm
This machine replaces qemu-generic-arm64, which was built on the AB until
60825ac6 landed.

Because the sbsa-ref machine boots a disk image inside qemu there is no
way for the static IPs to be passed to the kernel directly, which means
TAP networking fails. Work around this by always running the tests with
slirp networking.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-08 13:56:49 +01:00
Ross Burton
3f33fc21a1 publish-artefacts: remove generic-arm64
This was removed from meta-arm as it has been obsoleted by genericarm64.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-08 13:55:56 +01:00
Yoann Congal
91c85d95bb config.json: move repro excludes from AB config.json to meta-oe
For now, the known non-reproducible packages list is stored inside the
autobuilder config.json file. This is not ideal. Let's move this list
into each layers of meta-openembedded.

Since commit [0], non-repro-meta-*.inc files contain
KNOWN_NON_REPRO_META_* variables that contain list of known
non-reproducible package, we can use this for
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES.

[0]: https://git.openembedded.org/meta-openembedded/commit/?id=d3751ce994dcc70be3009cbf982983d051c6f6db

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-01 22:04:13 +01:00
Ross Burton
0b5bee6868 config.json: don't do SDK tests on fvp-base
There's very little to be gained by doing SDK tests for fvp-base, so
save some cycles by removing them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-26 22:16:51 +01:00
Ross Burton
60825ac629 config.json: remove generic-arm64 from meta-arm
This machine has been removed from meta-arm now that genericarm64 is in
meta-yocto-bsp.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-26 22:16:46 +01:00
Richard Purdie
e2ebe3dc11 cve-generate-chartdata: Handle unexpected files in the stats directory
A build of "stable/dunfell-nut" caused incorrect data to be added to the metrics
repo and resulted in script failures. Handle this situation better.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-26 10:48:15 +01:00
Richard Purdie
87db0dccbc scipts/run-patchmetrics: Copy metric data recursively to fix failures
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-26 07:26:30 +01:00
hulkoba
de094db1bb generate-chartdata: do not create lastyear json files
the two html files, index.html and index-full.html,
got merged so we only need the json file with the complete set of data.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25 14:43:55 +01:00
Ninette Adhikari
7fe66f781e cve-report: Reformat txt recipe list per branch
Yocto gathers the amount of CVEs per branch at the top of their metrics view.
However, the presentation of this information is not descriptive enough and it’s spread across several files.
This change adds collapsible, nested lists to show all cve information.

Show current CVE count per release,
parse txt files with CVE lists to group them by project and display their total CVE count.
Inline this data on the matrics-page in details elements so there’s no need to navigate away.

The current output includes the count of cve's and the cve-urls. No data is lost here, it looks like:

CVE counts by recipes:

linux-yocto: 134
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0524
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0656
  ...

bluez5: 2
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-3563
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-3637
...

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25 14:43:54 +01:00
Richard Purdie
c2ab478d5d config.json: Pull in pip addition and curl fix for buildtools
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-18 13:40:55 +01:00
Richard Purdie
ee359ebae0 config.json: Update to buildtools with setuptools in it
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 14:40:11 +01:00
Richard Purdie
786b32f7a6 config.json: Switch to a newer buildtools with websockets in
We're now using websockets for the hash equivalence server. Switch to a
buildtools tarball which contains it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 07:41:40 +01:00
Michael Halstead
9dd324ced0 config.json: point hashserv to v2 location with websockets
Enable new bitbake hashserv infrastructure.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2024-04-12 12:09:51 +01:00
Michael Halstead
b4f7c4d10a scripts/layer-parser: sort maintainers for better display
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2024-04-11 22:59:39 -07:00
Ross Burton
0dfdfff557 README: update patch submission address
Patches should now be sent to yocto-patches@.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-28 17:51:24 +00:00
Yoann Congal
7a71f86c51 config.json: metrics: Switch to daily CVE DB full-download
By using CVE_DB_INCR_UPDATE_AGE_THRES = CVE_DB_INCR_UPDATE_AGE_THRES = 6h,
cve-check will do a NVD database full download if the database is older
than 6h or reuse it un-updated if its younger than 6h. Since the metrics
builder is scheduled every day, that will result in a daily
full-download.

That will workaround NVD API limitations were some updates may be missed
and the incrementaly updated database is not equivalent to a freshly
downloaded database.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-13 22:08:16 +00:00
Ross Burton
4b9fe2cd8c scripts/abint: fix sorting on initial display
The default sorting was based on the list of seen times, but it should
be based on the latest seen time.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 22:54:53 +00:00
Ross Burton
d277a1ce1d scripts/abint: add argument parser
Add an argument parser so that the use of the cache or verbose logging
can be enabled/disabled without having to edit the source code.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 22:54:53 +00:00
Ross Burton
e2ede6667a scripts/abint: sort and organise imports
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 22:54:53 +00:00
Richard Purdie
142caae69e run-config/config.json: Add support for installing extra tools for specific targets
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 22:28:29 +00:00
Ross Burton
a9d143eee4 publish-artefacts: publish genericarm64 images
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-05 15:43:47 +00:00
Richard Purdie
a9b4f83c05 config.json: Switch poky-altcfg to use ipk as the package backend
Since we plan to have better "binary distro" testing on the autobuilder
and we plan to primarily use ipk for this, having ipk based images available
as part of our builds is desireable.

Since we want systemd based images with ipk, it makes sense to leave standard
poky using rpm images but switch poky-altcfg to use ipk.

Whilst late in the release cycle, doing this now for scarthgap gives us a good
platform to build off in the long term too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-05 15:43:47 +00:00
Yoann Congal
c9022ea5cc config.json: meta-oe-repro: fix meta-networking -> meta-python dependency
Since [0], meta-networking depends on meta-python. So, add meta-python
layer wherever meta-networking is used.

[0]: https://git.openembedded.org/meta-openembedded/commit/?id=ab7c469bfeb7aba97402d8eab03d9bb18725c6af

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-04 22:11:42 +00:00
Yoann Congal
c61d9f9ce2 config.json: meta-oe-repro: exclude packages that failed previously
Those are the non-reproducible packages from:
https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/13
https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/14

Only somewhat innocuous non-repro are added to
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES (compile date in package, TMPDIR
path, ...).
Actual non-repros were not excluded :
* drbd-utils: a udev rule is either enabled or disabled
* apache2: a index.html is present or not in the package
* toybox-inittab: a getty is started or not on serial ports

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-04 22:11:42 +00:00
Richard Purdie
903a187847 config.json: Drop obsolete distros from master config
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-04 14:07:16 +00:00
Richard Purdie
32966da2b0 config.json: Add genericarm64 support
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-28 19:05:05 +00:00
Richard Purdie
0415ac676f config.json: Add BB_LOADFACTOR_MAX setting
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-21 22:25:53 +00:00
Yoann Congal
5b2c23897e config.json: meta-oe-repro: exclude python3-pandas* from repro test
Exclude python3-pandas{,-src,-dbg} from reproducible tests as these look
non-reproducile for now[0][1].

[0]: https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/12/steps/40/logs/stdio
[1]: https://autobuilder.yocto.io/pub/repro-fail-openembedded/meta-python/oe-reproducible-20240217-j7swf3az/packages/diff-html/

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19 15:52:12 +00:00
Richard Purdie
094714e502 Add bitbake-extra-tests to cover taskexp ncurses UI.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-18 17:34:12 +00:00