ci: add build and kernel metadata to LAVA jobs - #3108
Conversation
| name: ${{ steps.print-output.outputs.filename }} | ||
| path: ${{ steps.print-output.outputs.filename }} | ||
|
|
||
| - name: Upload build metadata |
There was a problem hiding this comment.
This might take us above the allowed artifact threshold (again) quickly. I'm not sure how to prevent the problem. Maybe upload to S3?
There was a problem hiding this comment.
Size or count? I can bundle this into the other artifact to keep the count down?
| INPUTS_MACHINE: ${{ inputs.machine }} | ||
| INPUTS_DISTRO_NAME: ${{ inputs.distro_name }} | ||
| INPUTS_KERNEL_DIRNAME: ${{ inputs.kernel_dirname }} | ||
| - name: Extract build metadata from the image SBOM |
There was a problem hiding this comment.
turn it into action so you can install python dependencies properly.
There was a problem hiding this comment.
Theres no python dependencies to install, all are in stdlib I believe
|
Pushed to |
| fi | ||
| fi | ||
| DISTRO="${INPUTS_DISTRO:-${INPUTS_DISTRO_NAME}}" | ||
| KERNEL="${INPUTS_DISTRO_NAME#${DISTRO}}" |
There was a problem hiding this comment.
Stripping distro off distro_name works for the two suffixes test.yml uses today ("" and _linux-qcom-6.18), but the matrix also builds qcom-distro_linux-qcom-6.18_u-boot-qcom and qcom-distro_linux-qcom-rt-6.18_qcom-distro-kvm.
There was a problem hiding this comment.
fair, I've dropped that kernel variable because it was misleading anyway, and just pass distro and distro-name into metadata instead.
Test Results 68 files ± 0 319 suites ±0 7h 59m 10s ⏱️ - 3h 37m 53s For more details on these failures, see this check. Results for commit 81b82c7. ± Comparison against base commit bc1ff3a. This pull request removes 2 tests. |
81b82c7 to
0ad8374
Compare
Jobs recorded the build URL, pull request and workflow run, but not the commit they were built from, the configuration under test, or the kernel in the image, and none of it could be queried. The commit, branch and build type are derived from the event; the distro, build config, image and test plan the action already knows; the kernel's recipe, repository, commit and release are read from the SPDX SBOM every build already writes and passed over as an artifact. They are written to a per-machine EXTRA_METADATA variables file passed alongside the existing one, so recording a new key needs no change in lava-test-plans. Bump the pinned lava-test-plans revision to one that renders it. Signed-off-by: Matt Hart <matthart@qti.qualcomm.com>
0ad8374 to
908e505
Compare
|
Milosz Wasilewski (@mwasilew) I've added a bump to LAVA_TEST_PLANS_REF in here, so if you push this to next again, it should show actual metadata in the LAVA jobs. I can always remove that change for this to be merged here later. |
|
Something didn't work. This is one of the jobs from the |
Previous version of the patch (the one you pushed to next already) didnt have the LAVA_TEST_PLANS_REF change, so no new metadata will have been added. |
|
Pushed new version to |
|
New version works as expected. Here is an example job: https://lava.infra.foundries.io/scheduler/job/414293/definition#defline15 It needs to be confirmed whether this would work with PR as well. |
Jobs recorded the build URL, pull request and workflow run, but not the commit they were built from, the configuration under test, or the kernel in the image, and none of it could be queried.
The commit, branch and build type are derived from the event; the machine, distro, kernel, image and test plan the action already knows; the kernel's recipe, repository, commit and release are read from the SPDX SBOM every build already writes and passed over as an artifact.
They are written to a per-machine EXTRA_METADATA variables file passed alongside the existing one, so recording a new key needs no change in lava-test-plans.
This has no effect until the LAVA_TEST_PLANS_REF is bumped, but should quietly not add any metadata until that time.